[MacPorts] #69309: jasper @4.2.0_0+universal: ld: Undefined symbols: _glutTimerFunc (was: jasper-4.2.0_0+universal.darwin_23.arm64-x86_64 build failure - linker error with jiv)

MacPorts noreply at macports.org
Sat Feb 10 18:28:09 UTC 2024


#69309: jasper @4.2.0_0+universal: ld: Undefined symbols: _glutTimerFunc
------------------------+--------------------------
  Reporter:  murrayE    |      Owner:  (none)
      Type:  defect     |     Status:  closed
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.9.1
Resolution:  duplicate  |   Keywords:  sonoma arm64
      Port:  jasper     |
------------------------+--------------------------
Changes (by ryandesign):

 * status:  new => closed
 * resolution:   => duplicate


Old description:

> From main.log:
> {{{
> :info:build [100%] Linking C executable jiv
> :info:build cd
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build/src/app
> && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/jiv.dir/link.txt
> --verbose=ON
> :info:build [100%] Built target tmrdemo
> :info:build [100%] Built target test_1
> :info:build /usr/bin/clang -pipe -Os
> -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DNDEBUG
> -arch arm64 -arch x86_64 -isysroot
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
> min=14.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names
> -L/opt/local/lib -Wl,-headerpad_max_install_names
> -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
> -L/opt/local/lib -lglut CMakeFiles/jiv.dir/jiv.c.o -o jiv
> -Wl,-rpath,/opt/local/lib ../libjasper/libjasper.7.0.0.dylib
> /opt/local/lib/libjpeg.dylib
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/lib/libm.tbd
> -lpthread -lglut
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
> :info:build make[2]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
> :info:build make[2]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
> :info:build make[2]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
> :info:build ld: warning: ignoring duplicate libraries: '-lglut'
> :info:build [100%] Built target imginfo
> :info:build [100%] Built target jasper
> :info:build [100%] Built target multithread
> :info:build make[2]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
> :info:build ld: warning: ignoring duplicate libraries: '-lglut'
> :info:build ld: warning: ignoring file
> '/opt/local/lib/libglut.3.12.0.dylib': found architecture 'arm64',
> required architecture 'x86_64'
> :info:build [100%] Built target imgcmp
> :info:build ld: Undefined symbols:
> .............
> :info:build   _glutTimerFunc, referenced from:
> :info:build       _loadimage in jiv.c.o
> :info:build clang: error: linker command failed with exit
> }}}
>
> Is this related to https://trac.macports.org/ticket/67495 ?

New description:

 From main.log:
 {{{
 :info:build [100%] Linking C executable jiv
 :info:build cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build/src/app
 && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/jiv.dir/link.txt
 --verbose=ON
 :info:build [100%] Built target tmrdemo
 :info:build [100%] Built target test_1
 :info:build /usr/bin/clang -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DNDEBUG
 -arch arm64 -arch x86_64 -isysroot
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-
 min=14.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names
 -L/opt/local/lib -Wl,-headerpad_max_install_names
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
 -L/opt/local/lib -lglut CMakeFiles/jiv.dir/jiv.c.o -o jiv
 -Wl,-rpath,/opt/local/lib ../libjasper/libjasper.7.0.0.dylib
 /opt/local/lib/libjpeg.dylib
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/lib/libm.tbd
 -lpthread -lglut
 /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/OpenGL.tbd
 :info:build make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
 :info:build make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
 :info:build make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
 :info:build ld: warning: ignoring duplicate libraries: '-lglut'
 :info:build [100%] Built target imginfo
 :info:build [100%] Built target jasper
 :info:build [100%] Built target multithread
 :info:build make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_jasper/jasper/work/build'
 :info:build ld: warning: ignoring duplicate libraries: '-lglut'
 :info:build ld: warning: ignoring file
 '/opt/local/lib/libglut.3.12.0.dylib': found architecture 'arm64',
 required architecture 'x86_64'
 :info:build [100%] Built target imgcmp
 :info:build ld: Undefined symbols:
 .............
 :info:build   _glutTimerFunc, referenced from:
 :info:build       _loadimage in jiv.c.o
 :info:build clang: error: linker command failed with exit
 }}}

 Is this related to #67495?

--

Comment:

 > Is this related to #67495?

 Yes, it's the same problem. jasper has noticed freeglut is installed so it
 is trying to use it. But whereas in #67495 that succeeded, on yours it
 failed because you are trying to build jasper universal while freeglut is
 not installed universal.

-- 
Ticket URL: <https://trac.macports.org/ticket/69309#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list