Re: lzma-sdk and undefined references

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday, 27 August 2023 at 06:39, Elliott Sales de Andrade wrote:
> On Sat, Aug 26, 2023 at 6:30 AM Julian Sikorski <belegdol@xxxxxxxxx> wrote:
> >
> > Hello,
> >
> > now that lzma-sdk in Fedora rawhide is no longer ancient, I tried using
> > it with mame. Unfortunately, I got a number of undefined references when
> > linking:
> >
> > Is it a problem with lzma-sdk not shipping those? Or is mame using
> > private functions? Thanks for the feedback.
> >
> 
> Looking at the shared library, it has for example:
> 
> <mock-chroot> sh-5.2# objdump -T /usr/lib64/liblzmasdk.so | grep
> MtCoder_Destruct
> 0000000000000000      D  *UND*  0000000000000000  Base        MtCoder_Destruct
> 
> The *UND* indicates that the symbol is referenced, but not defined.
> This does not seem intended.
> 
> I'm not sure if this is the reason, but it appears that the lzma-sdk
> build is incorrect. Looking at the log from the latest build on
> x86_64, we see:
[...]
> but then the final linkage has:
> 
> g++ -o liblzmasdk.so.22.01.0 -shared -Wl,-soname=liblzmasdk.so.22
> -DNDEBUG -O2 -flto=auto -ffat-lto-objects -fexceptions -g
> -grecord-gcc-switches -pipe -Wall -Werror=format-security
> -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
> -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
>  -m64   -mtune=generic -fasynchronous-unwind-tables
> -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer
> -mno-omit-leaf-frame-pointer    _o/7zCrc.o _o/7zCrcOpt.o _o/Alloc.o
> _o/Bra86.o _o/CpuArch.o _o/LzFind.o _o/LzmaDec.o _o/LzmaEnc.o
> _o/Lzma2Dec.o _o/Lzma2Enc.o _o/Lzma86Dec.o _o/Lzma86Enc.o
> _o/LzFindMt.o _o/LzFindOpt.o _o/Synchronization.o _o/Threads.o
> _o/FileDir.o _o/FileFind.o _o/FileName.o _o/MyWindows.o _o/TimeUtils.o
>  _o/CommandLineParser.o _o/CRC.o _o/CrcReg.o _o/IntToString.o
> _o/LzFindPrepare.o _o/MyString.o _o/MyVector.o _o/NewHandler.o
> _o/StringConvert.o _o/StringToInt.o _o/UTFConvert.o  _o/FileIO.o
> _o/PropVariant.o _o/System.o _o/SystemInfo.o  _o/LzmaDecoder.o
> _o/LzmaEncoder.o _o/LzmaRegister.o  _o/CreateCoder.o _o/CWrappers.o
> _o/FileStreams.o _o/FilterCoder.o _o/MethodProps.o _o/StreamObjects.o
> _o/StreamUtils.o  _o/BenchCon.o _o/ConsoleClose.o  _o/LzmaAlone.o
> _o/Bench.o   -lpthread -ldl
> 
> As you can see, none of the LDFLAGS are passed to the linker, only the CFLAGS.

I thought LDFLAGS only need to be passed if the linker is ld, but if
it's gcc, passing CFLAGS is sufficient.

Anyway, please open a bugzilla so that I can track and fix this.

Regards,
Dominik
-- 
Fedora   https://fedoraproject.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
        -- from "Collected Sayings of Muad'Dib" by the Princess Irulan
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux