Error in ./waf

85 views
Skip to first unread message

柯瀞雯

unread,
Oct 13, 2019, 5:18:18 AM10/13/19
to ns-3-users
Hello everyone,
I copy new module v2x-lte to src/ folder,
and then I type the  command "./waf configure --enable-examples" and "./waf".
I am getting the following error:


 /usr/bin/ld: src/v2x-lte/model/gen/AccelerationConfidence.c.1.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
src/v2x-lte/model/gen/AccelerationConfidence.c.1.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

How should solve this problem?
Thank you very much!

Tom Henderson

unread,
Oct 13, 2019, 10:55:39 AM10/13/19
to ns-3-...@googlegroups.com, 柯瀞雯
Try reconfiguring and rebuilding the project after you move files.

./waf distclean
./waf configure --enable-examples --enable-tests
./waf build

柯瀞雯

unread,
Oct 13, 2019, 11:13:48 AM10/13/19
to ns-3-users
Hello Tom,
Thanks for your reply!
I use different version (3.25,3.26 and 3.30) to try .
I reconfigure and rebuilding the project ,but it still not work.

Tom Henderson於 2019年10月13日星期日 UTC+8下午10時55分39秒寫道:

Tom Henderson

unread,
Oct 13, 2019, 12:04:45 PM10/13/19
to ns-3-...@googlegroups.com, 柯瀞雯
On 10/13/19 8:13 AM, 柯瀞雯 wrote:
> Hello Tom,
> Thanks for your reply!
> I use different version (3.25,3.26 and 3.30) to try .
> I reconfigure and rebuilding the project ,but it still not work.

I have never seen that error in ns-3. It seems to be complaining that
it is trying to make a PIE program but the AccelerationConfidence.c.1.o
was not compiled with -fPIC flag. However, normally in ns-3, we do not
pass -fPIC to cxxflags or -pie to linkflags, so I am wondering whether
you are trying to do something different with your library. We do use
-fPIE and -pie in DCE.

- Tom

Nataraju A B (Gmail)

unread,
Oct 13, 2019, 1:18:00 PM10/13/19
to ns-3-...@googlegroups.com, 柯瀞雯
Try 

./waf  configure
./waf 
./waf  run --enable-examples --enable-tests

HTH

Thanks,
Nataraju A.B.


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/fa679041-b6f0-7a97-18cc-674d75d41f68%40tomh.org.

Pranns3

unread,
Aug 8, 2020, 12:07:53 PM8/8/20
to ns-3-users
Hi,

Even i faced same issue. Were you able to correct it. If yes how did you correct it. Please let me know.
Thank you.
Reply all
Reply to author
Forward
0 new messages