On 7/6/2012 04:16, Rune K. Svendsen wrote:
> Hi list!
> 
> I'm trying to build the Streamer part of the PeerStreamer open source 
> project (http://peerstreamer.org) using the gcc-mingw-w64 package on 
> Ubuntu 12.04 (gcc version 4.6.3). The building process goes fine. Some 
> warnings, but I think that's to expect. When it gets to the final step 
> of statically linking together all the libraries into a single 
> executable using the following command, I am met with the following error:
> 
>      i686-w64-mingw32-g++ 
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/GRAPES/src 
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//ml
>  
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS/3RDPARTY-LIBS/libevent/lib
>  
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//dclog
>  
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//rep
>  
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//monl
>  
> -L/home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//common
>  
> -static transition/node_addr.o dbg.o 
> /home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/GRAPES/src/net_helper-ml.o
>  
> streaming.o net_helpers.o topology.o nodeid_set.o chunk_signaling.o 
> chunklock.o transaction.o ratecontrol.o channel.o loop.o measures-monl.o 
> output-grapes.o input-chunkstream.o output-chunkstream.o 
> streamer-ml-monl-chunkstream-static.exe.o 
> /home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/GRAPES/src/libgrapes.a
>  
> /home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//ml/libml.a
>  
> /home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//monl/libmon.a
>  
> -lgrapes -lml -lm -lstdc++ -lmon -lrep -ldclog -lcommon -levent -lmsvcrt 
> -lwsock32 -lws2_32 -liberty    -o streamer-ml-monl-chunkstream-static.exe
>     Warning: resolving _gethostname by linking to _gethostname@8
>     Use --enable-stdcall-fixup to disable these warnings
>     Use --disable-stdcall-fixup to disable these fixups
>     `_gethostname' referenced in section `.text' of 
> /home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS//dclog/libdclog.a(dclog.o):
>  
> defined in discarded section `.text' of 
> /usr/lib/gcc/i686-w64-mingw32/4.6/../../../../i686-w64-mingw32/lib/../lib/libwsock32.a(dqgsbs00042.o)
>     collect2: ld returned 1 exit status
> 
> Can anyone help me in understanding what this error means?
> 
> I made a script that uses nm to look up the _gethostname symbol in all 
> the involved object files, and this is what it says the various files 
> contain:
> 
> /home/rune/Programming/Streamers-build-win32/Streamers/net_helpers.o
>              U __imp__gethostname@8
> /home/rune/Programming/Streamers-build-win32/THIRDPARTY-LIBS/NAPA-BASELIBS/dclog/libdclog.a
>              U _gethostname

This file is missing proper header includes, causing it to have wrong
symbols. Add the include, see if it fixes the issue.

The subtle warnings about implicit function declaration when you built
dclog.o can lead to a program crash with the wrong call convention.

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to