bugGNU Astronomy Utilities - Bugs: bug #62904, --disable-shared option not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62904: --disable-shared option not working for configure script on CentOS 7

Submitter:  Jash Shah <jash_shah>
Submitted:  Tue 16 Aug 2022 07:08:43 PM UTC
 
Category:  Installation Severity:  3 - Normal
Item Group:  Configuration file Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Tue 16 Aug 2022 07:08:43 PM UTC, original submission:  

Description

Upon calling the configure script with the --disable-shared option, the shared library of Gnuastro i.e libgnuastro.so should not be built. However, this behavior is not shown by CentOS 7.

Complete Error message

/bin/sh ../libtool  --tag=CC   --mode=link gcc  -Wall -g -O0  -pthread -version-info 16:0:0 -lgit2   -ltiff   -ljpeg   /usr/local/lib/libwcs.a   /usr/local/lib/libcfitsio.a   -lz   -lgsl -lgslcblas   -lm    -lc -no-undefined -fPIC -o libgnuastro.la -rpath /usr/local/lib wcsdistortion.lo arithmetic.lo arithmetic-and.lo arithmetic-bitand.lo arithmetic-bitlsh.lo arithmetic-bitor.lo arithmetic-bitrsh.lo arithmetic-bitxor.lo arithmetic-divide.lo arithmetic-eq.lo arithmetic-ge.lo arithmetic-gt.lo arithmetic-le.lo arithmetic-lt.lo arithmetic-minus.lo arithmetic-modulo.lo arithmetic-multiply.lo arithmetic-ne.lo arithmetic-or.lo arithmetic-plus.lo arithmetic-set.lo array.lo binary.lo blank.lo box.lo checkset.lo convolve.lo cosmology.lo data.lo ds9.lo eps.lo fits.lo git.lo interpolate.lo jpeg.lo kdtree.lo label.lo list.lo match.lo options.lo pdf.lo permutation.lo pointer.lo polygon.lo qsort.lo dimension.lo speclines.lo statistics.lo table.lo tableintern.lo threads.lo tiff.lo tile.lo tile-internal.lo timing.lo txt.lo type.lo units.lo wcs.lo ../bootstrapped/lib/libgnu.la -lpthread

*** Warning: Linking the shared library libgnuastro.la against the
*** static library /usr/local/lib/libwcs.a is not portable!

*** Warning: Linking the shared library libgnuastro.la against the
*** static library /usr/local/lib/libcfitsio.a is not portable!
libtool: link: gcc -shared  -fPIC -DPIC  .libs/wcsdistortion.o .libs/arithmetic.o .libs/arithmetic-and.o .libs/arithmetic-bitand.o .libs/arithmetic-bitlsh.o .libs/arithmetic-bitor.o .libs/arithmetic-bitrsh.o .libs/arithmetic-bitxor.o .libs/arithmetic-divide.o .libs/arithmetic-eq.o .libs/arithmetic-ge.o .libs/arithmetic-gt.o .libs/arithmetic-le.o .libs/arithmetic-lt.o .libs/arithmetic-minus.o .libs/arithmetic-modulo.o .libs/arithmetic-multiply.o .libs/arithmetic-ne.o .libs/arithmetic-or.o .libs/arithmetic-plus.o .libs/arithmetic-set.o .libs/array.o .libs/binary.o .libs/blank.o .libs/box.o .libs/checkset.o .libs/convolve.o .libs/cosmology.o .libs/data.o .libs/ds9.o .libs/eps.o .libs/fits.o .libs/git.o .libs/interpolate.o .libs/jpeg.o .libs/kdtree.o .libs/label.o .libs/list.o .libs/match.o .libs/options.o .libs/pdf.o .libs/permutation.o .libs/pointer.o .libs/polygon.o .libs/qsort.o .libs/dimension.o .libs/speclines.o .libs/statistics.o .libs/table.o .libs/tableintern.o .libs/threads.o .libs/tiff.o .libs/tile.o .libs/tile-internal.o .libs/timing.o .libs/txt.o .libs/type.o .libs/units.o .libs/wcs.o  -Wl,--whole-archive ../bootstrapped/lib/.libs/libgnu.a -Wl,--no-whole-archive  -lgit2 -ltiff -ljpeg /usr/local/lib/libwcs.a /usr/local/lib/libcfitsio.a -lz -lgsl -lgslcblas -lm -lc -lpthread  -g -O0   -pthread -Wl,-soname -Wl,libgnuastro.so.16 -o .libs/libgnuastro.so.16.0.0
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcsfix.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcshdr.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcs.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcspih.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcstrig.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcsunits.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcsutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcsutrn.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(cel.o): relocation R_X86_64_32S against symbol `cel_prjerr' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(dis.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(lin.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(prj.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(spc.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(spx.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(tab.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcserr.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcsulex.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /usr/local/lib/libwcs.a(wcsprintf.o): warning: relocation against `stdout@@GLIBC_2.2.5' in read-only section `.text'
collect2: error: ld returned 1 exit status
make[2]: *** [libgnuastro.la] Error 1
make[2]: Leaving directory `/io/gnuastro-0.18/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/io/gnuastro-0.18'
make: *** [all] Error 2

How did I come across the bug

I have been trying to build many-linux builds for the Python package of Gnuastro as part of sr #110613. This requires me to install gnuastro in a docker container with a CentOS 7 image.
In order to avoid users of the Python package from having to install libgnuastro every time they install the Python package from PyPI, we statically link to libgnuastro by including it in the wheel file itself. This requires Gnuastro in the docker to be built with the --disable-shared option.

How to recreate

The docker image can be found at quay.io/pypa/manylinux2014_x86_64 and info on how to run the docker container can be found at https://github.com/pypa/manylinux .
Once you are inside the docker, you need to install wcslib and cfitsio from their source. You can find more info about how to do so hereThen you can get the latest gnuastro tarball and unzip it. and run the

./configure --disable-shared
make

to recreate the error.

Jash Shah <jash_shah>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jash_shah (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.9