wireshark-dev May 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: Re: [Wireshark-dev] CMake -fPIC flag

Re: [Wireshark-dev] CMake -fPIC flag

From: Joerg Mayer <jmayer_at_nospam>
Date: Sat May 15 2010 - 21:49:44 GMT
To: wireshark-dev@wireshark.org

On Sat, May 15, 2010 at 09:12:27PM +0100, Jose Pedro Oliveira wrote:
> > Anything I'm missing here? Can you please provide a few more details on your
> > system and your cmake options?
>
> I believe Bruno was mentioning this problem that appears in
> Fedora 12 x86_64 systems:
>
> System : Fedora 12 x86_64 with updates
> Wireshark: svn revision 32819 (1.3.6 tobe)
> Building steps:
> mkdir Build; cd Build
> cmake ../ # all requirements expect YAPP
> make
> ----------
> ...
> /usr/bin/ld: ../lib/libwslua.a(init_wslua.c.o): relocation R_X86_64_32
> against `.rodata.str1.1' can not be used when making a shared object;
> recompile with -fPIC
> ../lib/libwslua.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make[2]: *** [lib/libwireshark.so] Error 1
> make[2]: Leaving directory
> `/home/fedora/rpms/BUILD/wireshark-1.3.6-SVN-32819/Build'
> ...
> -----------

Ah, OK, this helps me to get an idea what went wrong: I link two "static"
libraries (libwslua and libwspython) into a dynamic lib (libwireshark).
This seems to cause the "static" libs to be linked/built without -fPIC.
I'll have to think about how to fix that. I'm on a business trip to Londen
for a week starting tomorrow, so I don't know whether I'll find the time
to look into this during the week (not only because of the work, but also
because I want to get and see a bit of London ;-)
If nobody beats me to it, I will look at it in a weeks time. Workaround:
Disable lua and python support in CMakeOptions.txt

Thanks for reporting/explaining

         joerg
-- Joerg Mayer <jmayer@loplof.de> We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev@wireshark.org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe