Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#68942 closed defect (invalid)

gettext: dyld[53501]: Symbol not found: (_libiconv)

Reported by: falkuh Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: gettext-runtime

Description

Hi, after installing port via zsh commandline (MacOS 12.7.1 Monterey) and successful installation of gramps

sudo port install gramps

and starting gramps

gramps

I get the following error:

dyld[53501]: Symbol not found: (_libiconv)
  Referenced from: '/opt/local/lib/libintl.8.dylib'
  Expected in: '/usr/lib/libiconv.2.dylib'

Any help?

Change History (9)

comment:1 Changed 5 months ago by jmroot (Joshua Root)

Cc: ryandesign added
Keywords: dyld error removed
Port: gettext-runtime added
Summary: dyld[53501]: Symbol not foundgettext: dyld[53501]: Symbol not found: (_libiconv)

The libintl provided by the gettext-runtime port should be linked against libiconv from the libiconv port, not the system libiconv. Like this:

% otool -L /opt/local/lib/libintl.8.dylib
/opt/local/lib/libintl.8.dylib:
	/opt/local/lib/libintl.8.dylib (compatibility version 12.0.0, current version 12.0.0)
	/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1953.255.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)

What does that command show for you? And do you have any environment variables starting with DYLD set? (Note that /usr/bin/env will not show them on recent macOS versions because it is a SIP binary…)

comment:2 Changed 5 months ago by falkuh

otool -L /opt/local/lib/libintl.8.dylib
/opt/local/lib/libintl.8.dylib:
	/opt/local/lib/libintl.8.dylib (compatibility version 12.0.0, current version 12.0.0)
	/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1858.112.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)

so the version numbers are slightly different from those you showed.

Printenv indeed showed no DYLD envs but in my .zprofile I find

export DYLD_LIBRARY_PATH=/usr/lib:/opt/X11/lib:/opt/local/lib:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib

Maybe I should disable SIP for a moment and install a symlink in /usr/lib such as

sudo ln -s /usr/local/MacGPG2/lib/libiconv.2.dylib libiconv.2.dylib

?? Thanks for your prompt reply.

comment:3 Changed 5 months ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed

Don't set DYLD_LIBRARY_PATH globally, it will mess with all linking. It's not the same as LD_LIBRARY_PATH on Linux. In most cases, anything that requires DYLD_LIBRARY_PATH to be set is not linked correctly. If something really does need it to be set, you only want to set it when running that one thing.

Closing the ticket since this is a configuration issue with your system and not something we can fix on our end.

comment:4 Changed 5 months ago by falkuh

I dont think its a DYLD issue.

I did the following:

outcomment the DYLD-path in .zshrc

source .zshrc

then

sudo port -R upgrade libiconv
sudo port selfupdate
sudo  port upgrade outdated
sudo port uninstall gramps
sudo port install gramps
gramps

and get the same error message:

dyld[58995]: Symbol not found: (_libiconv)
  Referenced from: '/opt/local/lib/libintl.8.dylib'
  Expected in: '/usr/lib/libiconv.2.dylib'

comment:5 Changed 5 months ago by kencu (Ken)

what does this show now, then?

printenv | grep DYLD

comment:6 Changed 5 months ago by falkuh

Nothing

comment:7 Changed 5 months ago by falkuh

As I said, I have an libiconv.2.dylib in /usr/local/MacGPG2/lib/

Could that be used?

comment:8 Changed 5 months ago by jmroot (Joshua Root)

As established above, printenv can't see it. Something is making dyld attempt to load a library other than the one it's linked with. Sourcing a config file won't unset previously set variables, you should start a new shell to be sure. Also I thought you found it in .zprofile not .zshrc.

comment:9 Changed 5 months ago by falkuh

You are right both ways. I meant .zprofile. And after restarting the terminal seshion gramps started under XQuartz.

Sorry for bothering and many thanks for your help.

Note: See TracTickets for help on using tickets.