indilib / indi

INDI Core Library Repository
https://www.indilib.org
GNU Lesser General Public License v2.1
377 stars 394 forks source link

Compilation issue for 2.0.10-current (5th of October) - [ 34%] Linking C shared library libfli.so #2126

Closed radupantiru closed 1 month ago

radupantiru commented 1 month ago

Describe the bug When compiling the code using https://aur.archlinux.org/libindi_3rdparty.git in order to make a package for Arch with the code modification for 2.0.10 I am getting the error shown in the Log Files section

To Reproduce Running the script included in PKGBUILD

pkgname=libindi_3rdparty
pkgver=2.1.0
  cmake -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DFISHCAMP_LIBRARIES=/tmp/${pkgname}_${pkgver}/usr/lib/libfishcamp.so \
    -DFISHCAMP_INCLUDE_DIR:PATH=/tmp/${pkgname}_${pkgver}/usr/include/libfishcamp \
    -DAPOGEE_LIBRARY=/tmp/${pkgname}_${pkgver}/usr/lib/libapogee.so \
    -DAPOGEE_INCLUDE_DIR:PATH="/tmp/${pkgname}_${pkgver}/usr/include/libapogee;/tmp/${pkgname}_${pkgver}/usr/include" \
    -DFLI_LIBRARIES=/tmp/${pkgname}_${pkgver}/usr/lib/libfli.so \
    -DFLI_INCLUDE_DIR:PATH=/tmp/${pkgname}_${pkgver}/usr/include \
    -DSBIG_LIBRARIES=/tmp/${pkgname}_${pkgver}/usr/lib/libsbig.so \
    -DSBIG_INCLUDE_DIR:PATH=/tmp/${pkgname}_${pkgver}/usr/include/libsbig \
    -DWITH_ASICAM=Off \
    -DWITH_QHY=Off \
    -DWITH_GPSD=Off \
    -DWITH_QSI=Off \
    -DWITH_EQMOD=Off \
    -DWITH_GPSNMEA=Off .

  cd build
  make DESTDIR="$pkgdir" install

Expected behavior Successful compilation

Desktop (please complete the following information):

Log Files /usr/bin/ld: /tmp/ccRYeByL.ltrans1.ltrans.o: warning: relocation against `unix_fli_trylock' in read-only section `.text' /usr/bin/ld: /tmp/ccRYeByL.ltrans1.ltrans.o: relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [libfli/CMakeFiles/fli.dir/build.make:290: libfli/libfli.so.2.0] Error 1 make[1]: *** [CMakeFiles/Makefile2:2007: libfli/CMakeFiles/fli.dir/all] Error 2 make: *** [Makefile:156: all] Error 2

radupantiru commented 1 month ago

Ended up using the Arch binary.

Possibly for this to be the explanation as the aur PKGBUILD is trying to compile twice.