Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] imagemagick/7.0.11-14 : Linker error against openjpeg in Ubuntu 20.04 #8430

Closed
wbehrens-on-gh opened this issue Dec 14, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@wbehrens-on-gh
Copy link
Contributor

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: imagemagick/7.0.11-14
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: GCC 9.3.0
  • Docker image: N/A
  • Conan version: conan 1.43.0
  • Python version: Python 3.8.10

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=9
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

conan create . -pr:b=default --build
I also should mention that in the only hits on google I got for this error it said something about different libc ABI issues but I currently am building all these packages locally so they should be built all against the same libc?

Logs (Include/Attach if Applicable)

Click to expand log
  CXXLD    Magick++/lib/libMagick++-7.Q16HDRI.la
  CCLD     utilities/magick
/usr/bin/ld: /home/william/.conan/data/openjpeg/2.4.0/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib/libopenjp2.a(tcd.c.o): in function `opj_tcd_rateallocate':
tcd.c:(.text+0x3ab8): undefined reference to `__exp_finite'
/usr/bin/ld: /home/william/.conan/data/openjpeg/2.4.0/_/_/package/6af9cc7cb931c5ad942174fd7838eb655717c709/lib/libopenjp2.a(tcd.c.o): in function `opj_tcd_init_tile':
tcd.c:(.text+0x4b10): undefined reference to `__exp2_finite'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:8045: utilities/magick] Error 1
make[1]: Leaving directory '/home/william/.conan/data/imagemagick/7.0.11-14/_/_/build/495d4b92c4faa6a17bffb74bd0c85094a64623ed/ImageMagick'
make: *** [Makefile:6121: all] Error 2
imagemagick/7.0.11-14: 
imagemagick/7.0.11-14: ERROR: Package '495d4b92c4faa6a17bffb74bd0c85094a64623ed' build failed
imagemagick/7.0.11-14: WARN: Build folder /home/william/.conan/data/imagemagick/7.0.11-14/_/_/build/495d4b92c4faa6a17bffb74bd0c85094a64623ed
ERROR: imagemagick/7.0.11-14: Error in build() method, line 156
	env_build.make()
	ConanException: Error 2 while executing make -j8

@wbehrens-on-gh wbehrens-on-gh added the bug Something isn't working label Dec 14, 2021
@ericLemanissier
Copy link
Contributor

it looks like a glibc incompatibility issue. can you try to rebuild openjpeg with command line argument -b openjpeg ?

@wbehrens-on-gh
Copy link
Contributor Author

hm strange, openjpeg was built on that same system already, re running the build fixed it

@mmomtchev
Copy link

mmomtchev commented Sep 21, 2023

@ericLemanissier If I delete my ~/.conan and start anew with an openjpeg/2.5.0 in my requirements, I get a libjp2 with the dreaded -ffast-math. If I reinstall it with conan install . -b openjpeg, it goes away. I am using conan 1.61.0 and I have an empty default profile.

The current generally prevailing opinion is that -ffast-math should be burninated. glibc has dropped support for it.

@ericLemanissier
Copy link
Contributor

see #18951 (comment) and conan-io/hooks#508 for related dicussion

A simple solution is to use -fno-finite-math-only compilation flag during build of the offending package (openjpeg). Don't hesitate to make a PR, something like:

if not is_msvc(self):
    tc.variables["CMAKE_C_FLAGS"] = "-fno-finite-math-only"
    tc.variables["CMAKE_CXX_FLAGS"] = "-fno-finite-math-only"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants