devkitPro.org
https://devkitpro.org/

Incompatible libraries (portlibs)?
https://devkitpro.org/viewtopic.php?f=40&t=8789
Page 1 of 1

Author:  nebiun [ Sun Oct 07, 2018 10:26 am ]
Post subject:  Incompatible libraries (portlibs)?

Compiling an old project with last PPC version I have this errors during linking phase:

C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function `ft_bzip2_stream_close':
ftbzip2.c:(.text+0x3c): undefined reference to `BZ2_bzDecompressEnd'
C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function `ft_bzip2_file_fill_output':
ftbzip2.c:(.text+0x110): undefined reference to `BZ2_bzDecompress'
C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function `ft_bzip2_stream_io':
ftbzip2.c:(.text+0x3bc): undefined reference to `BZ2_bzDecompressEnd'
ftbzip2.c:(.text+0x3f4): undefined reference to `BZ2_bzDecompressInit'
C:/devkitPro/portlibs/ppc/lib\libfreetype.a(ftbzip2.o): In function `FT_Stream_OpenBzip2':
ftbzip2.c:(.text+0x668): undefined reference to `BZ2_bzDecompressInit'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [/opt/devkitpro/devkitPPC/wii_rules:25: /home/Nebiun/Downloads/WIIdev/conan/conan.elf] Error 1
make: *** [Makefile:102: build] Error 2

This is the output of pacman -Sl :
# pacman -Sl | grep ppc
dkp-libs ppc-bzip2 1.0.6-1 [installato]
dkp-libs ppc-freetype 2.9-3 [installato]
dkp-libs ppc-libjpeg-turbo 1.5.3-1 [installato]
dkp-libs ppc-libogg 1.3.3-2 [installato]
dkp-libs ppc-libpng 1.6.34-1 [installato]
dkp-libs ppc-libvorbisidec 1.2.1-1 [installato]
dkp-libs ppc-mpg123 1.25.10-1 [installato]
dkp-libs ppc-mxml 2.11-1 [installato]
dkp-libs ppc-pkg-config 0.28-3
dkp-libs ppc-zlib 1.2.11-1 [installato]

It's my fault (aka: I missing to do somethings), or libfreetype was built with a wrong version of libbzip2?

Thanks for your help.

Author:  WinterMute [ Wed Oct 10, 2018 11:24 pm ]
Post subject:  Re: Incompatible libraries (portlibs)?

Sounds like link order to me. Make sure your LIBS line has -lfreetype -lbz2 and not the other way round.

Author:  nebiun [ Thu Oct 11, 2018 6:06 pm ]
Post subject:  Re: Incompatible libraries (portlibs)?

More subtle problem: previous version of freetype library required zip library (option -lz), new version requires bz2 library (option -lbz2).
Now I need to link with both libraries because libpng requires -lz and freetype requires -lbz2.

Solved!
Thanks

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/