[mythtv-commits] Ticket #6795: [win32] mythmusic compilation fails at linker stage

MythTV mythtv at cvs.mythtv.org
Mon Aug 3 21:59:06 UTC 2009


#6795: [win32] mythmusic compilation fails at linker stage
----------------------------------------------------+-----------------------
 Reporter:  Jonathan Martens <jonathan at snetram.nl>  |        Owner:  nigel
     Type:  defect                                  |       Status:  new  
 Priority:  minor                                   |    Milestone:  0.22 
Component:  Ports - Windows                         |      Version:  head 
 Severity:  medium                                  |   Resolution:       
  Mlocked:  0                                       |  
----------------------------------------------------+-----------------------

Comment(by Jonathan Martens <jonathan at snetram.nl>):

 Even better when we do not need libFLAC anymmore, saves us some hassle as
 it does not even compile under MinGW anymore due to their move to CMake on
 top off that it seems my patch does not work after all. It seems the
 linker is picky on the order in which libs are linked. Linking with my
 patch links them before all QT related stuff and then it still errors out:

 {{g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-
 pseudo-rel
 oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,liblibmythmusic.a -o
 libmythmus
 ic.dll object_script.libmythmusic  -L'u:/Qt/4.5.2/lib' -lopengl32 -lglu32
 -lgdi3
 2 -luser32 -LU:/mythtv/build//lib -LU:/mythtv/build//bin -L/bin
 -lmyth-0.22 -lmy
 thui-0.22 -lmythtv-0.22 -lmythavformat-0.22 -lmythavcodec-0.22
 -lmythavutil-0.22
  -LU:/mythtv/build//lib -lfreetype -lmp3lame -lmythdb-0.22
 -lmythavutil-0.22 -lm
 ythavcodec-0.22 -lmyth-0.22 -lmythui-0.22 -lmythupnp-0.22
 -lmythswscale-0.22 -LU
 :/mythtv/build//bin -L/usr/lib -lmingw32 -lSDLmain -lSDL -mwindows
 -lwsock32 -lm
 ythtv-0.22 -lmythavformat-0.22 -ltag -logg -lvorbisfile -lvorbis
 -lvorbisenc -lF
 LAC -lmp3lame -lmythfreemheg-0.22 -logg -lQt3Support4 -lQtSql4 -lQtXml4
 -lQtOpen
 GL4 -lQtGui4 -lQtNetwork4 -lQtCore4
 Creating library file: liblibmythmusic.a
 u:/Msys/1.0/lib/libFLAC.a(bitwriter.o): In function
 `FLAC__bitwriter_get_buffer'
 :
 u:/sources/flac-1.2.1/src/libFLAC/bitwriter.c:286: undefined reference to
 `ntohl
 @4'
 u:/Msys/1.0/lib/libFLAC.a(bitwriter.o): In function
 `FLAC__bitwriter_write_rice_
 signed_block':
 u:/sources/flac-1.2.1/src/libFLAC/bitwriter.c:611: undefined reference to
 `ntohl
 @4'
 u:/sources/flac-1.2.1/src/libFLAC/bitwriter.c:645: undefined reference to
 `ntohl
 @4'
 u:/Msys/1.0/lib/libFLAC.a(bitwriter.o): In function
 `FLAC__bitwriter_write_raw_u
 int32':
 u:/sources/flac-1.2.1/src/libFLAC/bitwriter.c:367: undefined reference to
 `ntohl
 @4'
 u:/sources/flac-1.2.1/src/libFLAC/bitwriter.c:373: undefined reference to
 `ntohl
 @4'
 u:/Msys/1.0/lib/libFLAC.a(bitwriter.o):u:/sources/flac-1.2.1/src/libFLAC/bitwrit
 er.c:321: more undefined references to `ntohl at 4' follow
 collect2: ld returned 1 exit status
 make[1]: *** [libmythmusic.dll] Error 1
 make[1]: Leaving directory `/u/mythtv/mythplugins/mythmusic/mythmusic'
 make: *** [sub-mythmusic-make_default] Error 2}}

 But after I manually remove it from in between all the libs and put it at
 the end of the line it seems to work OK:

 {{bash.exe"-3.1$ make
 cd mythmusic/ && make -f Makefile
 make[1]: Entering directory `/u/mythtv/mythplugins/mythmusic/mythmusic'
 g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-
 pseudo-rel
 oc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,liblibmythmusic.a -o
 libmythmus
 ic.dll object_script.libmythmusic  -L'u:/Qt/4.5.2/lib' -lopengl32 -lglu32
 -lgdi3
 2 -luser32 -LU:/mythtv/build//lib -LU:/mythtv/build//bin -L/bin
 -lmyth-0.22 -lmy
 thui-0.22 -lmythtv-0.22 -lmythavformat-0.22 -lmythavcodec-0.22
 -lmythavutil-0.22
  -LU:/mythtv/build//lib -lfreetype -lmp3lame -lmythdb-0.22
 -lmythavutil-0.22 -lm
 ythavcodec-0.22 -lmyth-0.22 -lmythui-0.22 -lmythupnp-0.22
 -lmythswscale-0.22 -LU
 :/mythtv/build//bin -L/usr/lib -lmingw32 -lSDLmain -lSDL -mwindows
 -lmythtv-0.22
  -lmythavformat-0.22 -ltag -logg -lvorbisfile -lvorbis -lvorbisenc -lFLAC
 -lmp3l
 ame -lmythfreemheg-0.22 -logg -lQt3Support4 -lQtSql4 -lQtXml4 -lQtOpenGL4
 -lQtGu
 i4 -lQtNetwork4 -lQtCore4 -lwsock32
 Creating library file: liblibmythmusic.a
 make[1]: Leaving directory `/u/mythtv/mythplugins/mythmusic/mythmusic'
 cd theme/ && make -f Makefile
 make[1]: Entering directory `/u/mythtv/mythplugins/mythmusic/theme'
 gcc -c -march=pentium4 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99
 -D_FIL
 E_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-common -g -Wall -Wno-switch
 -Wdisabled
 -optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-
 qual -W
 write-strings -Wundef -fno-math-errno -fomit-frame-pointer -O3 -fomit-
 frame-poin
 ter -DNDEBUG -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DUSING_MINGW
 -D_GNU_SOURCE
 -DPREFIX="U:/mythtv/build/" -DMMX -Di386 -DUSING_DIRECTX
 -D_FILE_OFFSET_BITS=64
 -DQT_NEEDS_QMAIN -I'../../../build/include' -I'/usr/include'
 -I'../../../build'
 -I'../../../../qt/4.5.2/mkspecs/win32-g++' -o themedummy.o
 ../../themedummy.c
 g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-
 pseudo-rel
 oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o themenop.exe
 themedummy.o  -LU
 :/mythtv/build//lib -LU:/mythtv/build//bin -L/bin -lmyth-0.22
 -lmythui-0.22 -lmy
 thtv-0.22 -lmythavformat-0.22 -lmythavcodec-0.22 -lmythavutil-0.22
 make[1]: Leaving directory `/u/mythtv/mythplugins/mythmusic/theme'
 cd i18n/ && make -f Makefile
 make[1]: Entering directory `/u/mythtv/mythplugins/mythmusic/i18n'
 gcc -c -march=pentium4 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99
 -D_FIL
 E_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-common -g -Wall -Wno-switch
 -Wdisabled
 -optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-
 qual -W
 write-strings -Wundef -fno-math-errno -fomit-frame-pointer -O3 -fomit-
 frame-poin
 ter -DNDEBUG -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DUSING_MINGW
 -D_GNU_SOURCE
 -DPREFIX="U:/mythtv/build/" -DMMX -Di386 -DUSING_DIRECTX
 -D_FILE_OFFSET_BITS=64
 -DQT_NEEDS_QMAIN -I'../../../build/include' -I'/usr/include'
 -I'../../../build'
 -I'../../../../qt/4.5.2/mkspecs/win32-g++' -o dummy.o dummy.c
 g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-
 pseudo-rel
 oc -Wl,-s -mthreads -Wl -Wl,-subsystem,windows -o i18n.exe dummy.o
 -LU:/mythtv/
 build//lib -LU:/mythtv/build//bin -L/bin -lmyth-0.22 -lmythui-0.22
 -lmythtv-0.22
  -lmythavformat-0.22 -lmythavcodec-0.22 -lmythavutil-0.22
 make[1]: Leaving directory `/u/mythtv/mythplugins/mythmusic/i18n'
 bash.exe"-3.1$}}

 I am puzzled and out of clues...

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/6795#comment:3>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list