Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#70068 closed defect (fixed)

genius @1.0.27: ld: file not found: genius

Reported by: dyne2meter Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: mohd-akram (Mohamed Akram)
Port: genius

Description

Build failure on 10.13 High Sierra:

:info:build libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I.. -DGNOMELOCALEDIR=\"/opt/local/share/locale\" -DG_LOG_DOMAIN=\"Genius\" -DDATADIR=\"/opt/local/share\" -DLIBEXECDIR=\"/opt/local/libexec\" -DBUILDDIR=\"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/work/genius-1.0.27\" -I. -I.. -I../ve -I../gtkextra -I.. -I../ve -I../gtkextra -fno-strict-aliasing -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Warray-bounds -Wreturn-type -Wswitch-default -Wnull-dereference -Wdouble-promotion -Wno-error=unused-parameter -Wno-error=missing-field-initializers -I/opt/local/include/vte-2.91 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gtksourceview-4 -I/opt/local/include/libxml2 -I/opt/local/include/gtk-3.0 -I/opt/local/include/at-spi2-atk/2.0 -I/opt/local/include/at-spi-2.0 -I/opt/local/include/dbus-1.0 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/gtk-3.0 -I/opt/local/include/gio-unix-2.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/harfbuzz -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -pipe -Os -arch x86_64 -MT testplugin.lo -MD -MP -MF .deps/testplugin.Tpo -c testplugin.c -o testplugin.o >/dev/null 2>&1
:info:build mv -f .deps/funclib.Tpo .deps/funclib.Po
:info:build 1 warning generated.
:info:build mv -f .deps/mpwrap.Tpo .deps/mpwrap.Po
:info:build mv -f .deps/testplugin.Tpo .deps/testplugin.Plo
:info:build /bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/clang  -pipe -Os -arch x86_64 -module -avoid-version -Wl,-bundle_loader,genius -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o libtestplugin.la -rpath /opt/local/lib/genius testplugin.lo -lintl -lmpfr 
:info:build 4 warnings generated.
:info:build mv -f .deps/eval.Tpo .deps/eval.Po
:info:build /bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/clang  -pipe -Os -arch x86_64  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -o genius binreloc.o calc.o eval.o genius.o util.o dict.o funclib.o symbolic.o mpwrap.o mpzextra.o matrix.o matrixw.o matop.o compil.o parseutil.o inter.o lexer.o plugin.o plugread.o parse.o genius_lists.o utype.o geloutput.o ../ve/libvicious.a -lm -lgmp -lmpfr -lfl -lintl  -Wl,-framework -Wl,CoreFoundation -L/opt/local/lib -lgmodule-2.0 -lglib-2.0 -lintl -lreadline -ltermcap -lmpfr 
:info:build libtool: link: /usr/bin/clang -Wl,-undefined -Wl,dynamic_lookup -o .libs/libtestplugin.so -bundle  .libs/testplugin.o   -L/opt/local/lib -lintl -lmpfr  -Os -arch x86_64 -Wl,-bundle_loader -Wl,genius -Wl,-headerpad_max_install_names -arch x86_64  
:info:build ld: file not found: genius
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[3]: *** [libtestplugin.la] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build libtool: link: /usr/bin/clang -pipe -Os -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 -o genius binreloc.o calc.o eval.o genius.o util.o dict.o funclib.o symbolic.o mpwrap.o mpzextra.o matrix.o matrixw.o matop.o compil.o parseutil.o inter.o lexer.o plugin.o plugread.o parse.o genius_lists.o utype.o geloutput.o -Wl,-framework -Wl,CoreFoundation  -L/opt/local/lib ../ve/libvicious.a -lm -lgmp -lfl -lgmodule-2.0 -lglib-2.0 -lintl -lreadline -ltermcap -lmpfr
:info:build ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
:info:build Generating and caching the translation database
:info:build Merging translations into gnome-genius.desktop.
:info:build 3 warnings generated.
:info:build mv -f .deps/graphing.Tpo .deps/graphing.Po
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/work/genius-1.0.27/src'
:info:build make[2]: *** [all] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/work/genius-1.0.27/src'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/work/genius-1.0.27'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/work/genius-1.0.27'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/work/genius-1.0.27" && /usr/bin/make -j8 -w all 
:info:build Exit code: 2
:error:build Failed to build genius: command execution failed
:debug:build Error code: CHILDSTATUS 47255 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 10)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_genius/genius/main.log for details.

No designated maintainers are listed, so this may be kicked to the developer.

Attachments (1)

main.log.gz (14.8 KB) - added by dyne2meter 3 weeks ago.

Download all attachments as: .zip

Change History (12)

Changed 3 weeks ago by dyne2meter

Attachment: main.log.gz added

comment:1 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: mohd-akram added
Summary: ld: file not found: geniusgenius @1.0.27: ld: file not found: genius

I would guess this is happening because the genius Makefile was patched to add the flag -Wl,-bundle_loader,genius to libtestplugin_la_LDFLAGS which is used when building the libtestplugin.so target, but no genius dependency was added to the libtestplugin.so target. Therefore make didn't know that it needed to build genius before libtestplugin.so. Therefore, in your parallel build, it happened to start building libtestplugin.so before it had finished building genius, which is why genius was not found. If you repeat the build attempt without cleaning I suspect it will succeed.

Mohamed, why did you add that patch? What problem does it solve? Is there an upstream bug report or pull request or commit URL associated with your patch?

Last edited 3 weeks ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 3 weeks ago by mohd-akram (Mohamed Akram)

The build fails due to missing symbols without this patch. I'll see if I can add that dependency. I haven't opened a bug report and I'm not sure what a PR would look like since this is very Mac specific.

comment:3 in reply to:  2 ; Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to mohd-akram:

The build fails due to missing symbols without this patch.

It looks like that's because of the ubiquitous macOS 11+ libtool bug for which the usual patch should be applied instead. (This port's configure script was built with a libtool that was already somewhat patched for this problem in that it recognizes macOS 11, but not macOS 12 or later.)

comment:4 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

The upstream fix would be: release a new version, building its configure script with libtool 2.4.7 or later.

comment:5 in reply to:  3 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

the usual patch should be applied instead

I'm working on this.

comment:6 Changed 3 weeks ago by mohd-akram (Mohamed Akram)

Owner: set to ryandesign
Status: newassigned

comment:7 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 5b217afbf9d7a28b318e3a7f69a986bc6add42e9/macports-ports (master):

genius: Fix libtool macOS 11+ bug

Remove other patch that tried to work around the problem another way.

Closes: #70068

comment:8 Changed 3 weeks ago by mohd-akram (Mohamed Akram)

Thanks Ryan!

comment:9 Changed 3 weeks ago by dyne2meter

Thanks, Ryan. The build still chokes, first time through (on my system, anyway), but requesting the installation again without cleaning succeeds.

comment:10 in reply to:  9 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to mohd-akram:

Thanks Ryan!

Thank you Mohamed! The tell-tale sign of this bug is when you see undefined symbols, and that it came from a libtool invocation, and that the libtool invocation does not have the -undefined flag. There are several different variations of the patch floating around in the various ports, due to the different vintages of libtool used to build different ports' configure scripts, but usually you can just try applying a few of them to the problem port's configure script until you find one that works. Then you regenerate the configure script to remove the offset.

Replying to dyne2meter:

Thanks, Ryan. The build still chokes, first time through (on my system, anyway), but requesting the installation again without cleaning succeeds.

The parallel build failure should have been resolved by the above commit. You would need to wait one hour after the commit was made and then run sudo port sync or sudo port selfupdate to receive the fix.

comment:11 Changed 3 weeks ago by mohd-akram (Mohamed Akram)

Thanks, that makes sense. The last release of genius is a couple years old so maybe that's why the fix hasn't made its way through yet.

Note: See TracTickets for help on using tickets.