[Ns-developers] Linking issues between modules in ns-3.11
Kamakshi Sirisha Pathapati
kamipks at ittc.ku.edu
Tue Feb 7 13:39:56 PST 2012
Hi,
> Without details about which file defines this function, I would
> suggest that you check that you use NS_OBJECT_ENSURE_REGISTERED
> correctly.
I do not see any issue with the usage of NS_OBJECT_ENSURE_REGISTERED.
> Otherwise, ldd on the relevant binary files should go a
> long way towards helping you find the problem.
I did look into the dependencies using ldd on the files within build/debug
folder. Here is what I found:
[kamipks debug]$ ldd libns3-aeronp.so
libns3-internet.so => not found
libns3-mesh.so => not found
libns3-wifi.so => not found
libns3-applications.so => not found
libns3-bridge.so => not found
libns3-mpi.so => not found
libns3-network.so => not found
libns3-core.so => not found
libns3-propagation.so => not found
libns3-config-store.so => not found
libns3-tools.so => not found
libns3-mobility.so => not found
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00002b53a6cdd000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00002b53a701a000)
librt.so.1 => /lib64/librt.so.1 (0x00002b53a722e000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b53a7438000)
libm.so.6 => /lib64/libm.so.6 (0x00002b53a7738000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b53a79bb000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b53a7bca000)
libc.so.6 => /lib64/libc.so.6 (0x00002b53a7de5000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b53a813c000)
/lib64/ld-linux-x86-64.so.2 (0x0000003ddf800000)
I used the following lines in the wscript file to modify dependencies.
After including 'aeronp' I see the ./waf does not build or display any
build output.
src/internet/wscript:
obj = bld.create_ns3_module('internet', ['aeronp','bridge', 'mpi',
'network', 'core'])
obj.includes = '.'
[kamipks debug]$ ldd libns3-internet.so
libns3-bridge.so => not found
libns3-mpi.so => not found
libns3-network.so => not found
libns3-core.so => not found
librt.so.1 => /lib64/librt.so.1 (0x00002ae32c62c000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002ae32c835000)
libm.so.6 => /lib64/libm.so.6 (0x00002ae32cb36000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002ae32cdb9000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002ae32cfc7000)
libc.so.6 => /lib64/libc.so.6 (0x00002ae32d1e3000)
/lib64/ld-linux-x86-64.so.2 (0x0000003ddf800000)
Also, I see that this linking issue does not interfere when I am actually
running the script itself.
[kamipks AeroTP-3.11]$ ./waf
Waf: Entering directory `/raid5/kamipks/AeroTP-3.11/build'
[1273/1323] cxx_link: build/debug/utils/print-introspected-doxygen_4.o ->
build/debug/utils/print-introspected-doxygen
debug/libns3-internet.so: undefined reference to
`ns3::AeroNPL3Protocol::IsThereSpaceInNPQueue(ns3::AeroNPMessageType)'
debug/libns3-internet.so: undefined reference to `typeinfo for
ns3::AeroNPL3Protocol'
debug/libns3-internet.so: undefined reference to
`ns3::AeroNPL3Protocol::GetTypeId()'
collect2: ld returned 1 exit status
Waf: Leaving directory `/raid5/kamipks/AeroTP-3.11/build'
Build failed: -> task failed (err #1):
{task: cxx_link print-introspected-doxygen_4.o ->
print-introspected-doxygen}
[kamipks at bfs AeroTP-3.11]$ ./waf --run "scratch/http-itc
--transport_prot=AeroTPARQ --routingProtocol=AERORP
--mobilityModel=GaussMarkov --nWifis=10 --nodeSpeed=20 --ack_agg=0
--data=0.2 --MPL=60"
Waf: Entering directory `/raid5/kamipks/AeroTP-3.11/build'
[1256/1257] cxx_link: build/debug/scratch/http-itc_2.o ->
build/debug/scratch/http-itc
Waf: Leaving directory `/raid5/kamipks/AeroTP-3.11/build'
'build' finished successfully (1.290s)
Modules built:
aeronp aerorp aodv
applications bridge click
config-store core csma
csma-layout dsdv emu
energy flow-monitor internet
lte mesh mobility
mpi netanim network
nix-vector-routing ns3tcp ns3wifi
olsr openflow point-to-point
point-to-point-layout propagation simple-wireless-tdma
spectrum stats tap-bridge
template test tools
topology-read uan virtual-net-device
visualizer wifi wimax
Thanks,
Kamakshi.
>
> On Tue, Feb 7, 2012 at 17:26, Kamakshi Sirisha Pathapati
> <kamipks at ittc.ku.edu> wrote:
>> Hi,
>>
>> I have tried adding the module within the wscript to ensure dependencies
>> between the two modules but I when I tried to build it I did not see any
>> build results and it would run blank after the ./waf is issued.
>>
>> I use the "node->GetObject<AeroNPL3Protocol> ()" function to get the
>> required object and I see that there is no dependency issue between any
>> other module and the newer module, except for the src/internet.
>>
>> Please let me know if I could be wrong while doing the above.
>>
>> Thank you,
>> Kamakshi.
>>> Hi,
>>>
>>> On Mon, 06 Feb 2012 22:35:13 +0400, Kamakshi Sirisha Pathapati
>>> <kamipks at ittc.ku.edu> wrote:
>>>> I am curently working on implementing a transport protocol on the
>>>> ns-3.11
>>>> version. I am facing a few linking issues between the src/internet
>>>> module
>>>> and another new module added to ns3. While trying to obtain an object
>>>> from
>>>> a class I get the following error:
>>>>
>>>> [1300/1365] cxx_link: build/debug/utils/print-introspected-doxygen_4.o
>>>> ->
>>>> build/debug/utils/print-introspected-doxygen
>>>> debug/libns3-internet.so: undefined reference to `typeinfo for
>>>> ns3::AeroNPL3Protocol'
>>>> debug/libns3-internet.so: undefined reference to
>>>> `ns3::AeroNPL3Protocol::GetTypeId()'
>>>> collect2: ld returned 1 exit status
>>>>
>>>> Could you direct me to what causes this error?
>>>> I understand the error might be with my module but any help in this
>>>> regard
>>>> will be greatly appreciated.
>>> It looks like, you should edit appropriate wscript's to specify correct
>>> dependencies between your new modules and existing ones.
>>> In particular, modify 'src/internet/wscript' for line
>>> obj = bld.create_ns3_module('internet', ['bridge', 'mpi', 'network',
>>> 'core'])
>>> to contain your module too.
>>>
>>> --
>>> Andrey Mazo.
>>>
>>
>>
>
>
>
> --
> Mathieu Lacage <mathieu.lacage at gmail.com>
>
More information about the Ns-developers
mailing list