Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Patches don't apply/compile: need rework for TurboJPEG 3 API overhaul #7

Open
uartie opened this issue Feb 3, 2023 · 1 comment
Open

Comments

@uartie
Copy link
Contributor

uartie commented Feb 3, 2023

@Liangliang-Ma please rework your patches and resubmit. They do not work after:

    commit fc01f4673b71c0b833c59c21e8c4478a9c4bcf21
    Author: DRC <[email protected]>
    Date:   Thu Jan 5 06:36:46 2023 -0600

       TurboJPEG 3 API overhaul

I attempted to rebase and fix the conflicts in #6 but it still does not compile.

@uartie
Copy link
Contributor Author

uartie commented Feb 3, 2023

Hmmm... #6 compiles on our CI with Ubuntu Focal and Jammy.

However, it does not compile on my local Fedora 35 environment:

/usr/bin/ranlib libjpeg.a
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jccoefct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jccolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jcdctmgr.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jcdiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jclossls.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jcmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jcprepct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jcsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdapistd.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdcoefct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdcolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jddctmgr.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jddiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdlossls.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdmerge.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdpostct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jdsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jquant1.c.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg12.dir/jquant2.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jccolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jcdiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jclossls.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jcmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jcprepct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jcsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jdcolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jddiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jdlossls.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jdmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jdpostct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jdsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jquant1.c.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ../CMakeFiles/jpeg16.dir/jquant2.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jccoefct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jccolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jcdctmgr.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jcdiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jclossls.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jcmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jcprepct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jcsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdapistd.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdcoefct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdcolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jddctmgr.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jddiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdlossls.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdmerge.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdpostct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jdsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jquant1.c.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg12.dir/jquant2.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jccolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jcdiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jclossls.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jcmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jcprepct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jcsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jdcolor.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jddiffct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jdlossls.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jdmainct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jdpostct.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jdsample.c.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jquant1.c.o: relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/jpeg16.dir/jquant2.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/turbojpeg12.dir/rdppm.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/turbojpeg12.dir/wrppm.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/turbojpeg16.dir/rdppm.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/turbojpeg16.dir/wrppm.c.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
make[2]: *** [sharedlib/CMakeFiles/jpeg.dir/build.make:1139: libjpeg.so.62.4.0] Error 1
make[2]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libjpeg-turbo/__cmake_build'
make[1]: *** [CMakeFiles/Makefile2:1162: sharedlib/CMakeFiles/jpeg.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/turbojpeg.dir/build.make:1275: libturbojpeg.so.0.3.0] Error 1
make[2]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libjpeg-turbo/__cmake_build'
make[1]: *** [CMakeFiles/Makefile2:346: CMakeFiles/turbojpeg.dir/all] Error 2
/usr/bin/ranlib libturbojpeg.a
make[2]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libjpeg-turbo/__cmake_build'
[ 85%] Built target jpeg-static
make[2]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libjpeg-turbo/__cmake_build'
[ 85%] Built target turbojpeg-static
make[1]: Leaving directory '/home/uaeoff/Work/workspace/media/build/libjpeg-turbo/__cmake_build'
make: *** [Makefile:146: all] Error 2
make: Leaving directory '/home/uaeoff/Work/workspace/media/build/libjpeg-turbo/__cmake_build'

If I add -DCMAKE_C_FLAGS=-fPIC, then it compiles successfully.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant