Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65820 closed defect (fixed)

libsdl_ttf @2.0.11: rev-upgrade fails due to undefined symbols for architecture x86_64

Reported by: cooljeanius (Eric Gallager) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: jmroot (Joshua Root)
Port: libsdl_ttf

Description

rev-upgrade reports libsdl_ttf as broken:

Incompatible library version: /opt/local/lib/libSDL_ttf-2.0.0.dylib requires version 12.0.0 or later, but /opt/local/lib/libSDL-1.2.0.dylib provides version 1.0.0
DEBUG: Marking /opt/local/lib/libSDL_ttf-2.0.0.dylib as broken

...

--->  Found 4 broken files, matching files to ports
--->  Found 4 broken ports, determining rebuild order
DEBUG: Broken: SilentKnight
DEBUG: Broken: libsdl_ttf
DEBUG: Broken: iulib
DEBUG: Broken: boost171-numpy
DEBUG: Processing port SilentKnight @0:1.21_0
DEBUG: Processing port libsdl_ttf @0:2.0.11_0
DEBUG: Processing port libsdl_ttf-framework @0:20110120_0
DEBUG: Processing port iulib @0:0.4-20141216_2
DEBUG: Processing port boost171-numpy @0:1.71.0_4+cmake_scripts+no_single+no_static+python39
--->  Rebuilding in order
     SilentKnight @1.21_0
     libsdl_ttf @2.0.11_0
     iulib @0.4-20141216_2
     boost171-numpy @1.71.0_4+cmake_scripts+no_single+no_static+python39

...so, it tries to rebuild it, but that fails with this error:

libtool: link: /usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -I/opt/local/include/freetype2 -I/opt/local/include/SDL -D_THREAD_SAFE -DHAVE_OPENGL -Wl,-headerpad_max_install_names -Wl,-syslibroot -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -arch x86_64 -o .libs/glfont glfont.o -Wl,-framework -Wl,OpenGL -Wl,-framework -Wl,Cocoa  -L/opt/local/lib ./.libs/libSDL_ttf.dylib -lfreetype -lSDLmain -lSDL
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      _SDL_main in showfont.o
  "_libiconv_close", referenced from:
      _SDL_main in showfont.o
  "_libiconv_open", referenced from:
      _SDL_main in showfont.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [showfont] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl_ttf/libsdl_ttf/work/SDL_ttf-2.0.11'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libsdl_ttf/libsdl_ttf/work/SDL_ttf-2.0.11" && /usr/bin/make -j16 -w all 
Exit code: 2

This looks like that common libtool error. Maybe it needs an autoreconf? Anyways I'm on Big Sur with Xcode 13.2.1

Attachments (1)

libsdl_ttf_main.log (116.5 KB) - added by cooljeanius (Eric Gallager) 2 years ago.
main.log for libsdl_ttf

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by cooljeanius (Eric Gallager)

Attachment: libsdl_ttf_main.log added

main.log for libsdl_ttf

comment:1 in reply to:  description ; Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to cooljeanius:

rev-upgrade reports libsdl_ttf as broken:

Incompatible library version: /opt/local/lib/libSDL_ttf-2.0.0.dylib requires version 12.0.0 or later, but /opt/local/lib/libSDL-1.2.0.dylib provides version 1.0.0

/opt/local/lib/libSDL-1.2.0.dylib (provided by the libsdl port) is now just a symlink to /opt/local/libexec/sdl12-compat/lib/libSDL-1.2.0.dylib (provided by the sdl12-compat port).

Its minor compatibility version should be 12.0.0, and that's what it is on my Catalina system, even after rebuilding from source or redownloading the binary:

$ otool -L /opt/local/libexec/sdl12-compat/lib/libSDL.dylib
/opt/local/libexec/sdl12-compat/lib/libSDL.dylib:
	/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.52.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1894.40.150)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 52.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1675.129.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1675.129.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Evidently on your system the compatibility version has regressed to 1.0.0, and that should not be. Until that's fixed, nothing should be attempted with any port that depends on libsdl. Maybe fixing libsdl will fix this.

Try reinstalling the sdl12-compat binary:

sudo port -nb upgrade --force sdl12-compat
Undefined symbols for architecture x86_64:
  "_libiconv", referenced from:
      _SDL_main in showfont.o
  "_libiconv_close", referenced from:
      _SDL_main in showfont.o
  "_libiconv_open", referenced from:
      _SDL_main in showfont.o
ld: symbol(s) not found for architecture x86_64

This looks like that common libtool error. Maybe it needs an autoreconf?

It doesn't sound a like a common libtool error; it sounds like something that needs libiconv and has forgotton to add -liconv to the link flags. However, let's fix whatever's wrong with your sdl12-compat first before thinking about the things that depend on it.

comment:2 in reply to:  1 Changed 2 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

Replying to cooljeanius:

rev-upgrade reports libsdl_ttf as broken:

Incompatible library version: /opt/local/lib/libSDL_ttf-2.0.0.dylib requires version 12.0.0 or later, but /opt/local/lib/libSDL-1.2.0.dylib provides version 1.0.0

/opt/local/lib/libSDL-1.2.0.dylib (provided by the libsdl port) is now just a symlink to /opt/local/libexec/sdl12-compat/lib/libSDL-1.2.0.dylib (provided by the sdl12-compat port).

Its minor compatibility version should be 12.0.0, and that's what it is on my Catalina system, even after rebuilding from source or redownloading the binary:

$ otool -L /opt/local/libexec/sdl12-compat/lib/libSDL.dylib
/opt/local/libexec/sdl12-compat/lib/libSDL.dylib:
	/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 12.0.0, current version 12.52.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1894.40.150)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 52.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1675.129.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1675.129.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

On my system, this is:

$ otool -L /opt/local/libexec/sdl12-compat/lib/libSDL.dylib
/opt/local/libexec/sdl12-compat/lib/libSDL.dylib:
	/opt/local/lib/libSDL-1.2.0.dylib (compatibility version 1.0.0, current version 12.52.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2022.44.149)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 54.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1775.118.101)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

Evidently on your system the compatibility version has regressed to 1.0.0, and that should not be. Until that's fixed, nothing should be attempted with any port that depends on libsdl. Maybe fixing libsdl will fix this.

Try reinstalling the sdl12-compat binary:

sudo port -nb upgrade --force sdl12-compat

I tried this, but rev-upgrade still reports it as broken...

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

I think this is a duplicate of #65768 and your ports are out of date? Run sudo port selfupdate to receive the fix.

comment:4 Changed 2 years ago by jmroot (Joshua Root)

Owner: set to jmroot
Resolution: fixed
Status: newclosed

In 471d864040882afa6afb63a7c5737d4f9475a039/macports-ports (master):

libsdl_ttf: update to latest SDL-1.2 commit

Fixes: #65820

comment:5 Changed 2 years ago by jmroot (Joshua Root)

The silly thing is, showfont isn't even installed. This was a separate issue, but libSDL should still have compatibility_version 12.0.0 if you're up to date.

comment:6 in reply to:  3 Changed 2 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign:

I think this is a duplicate of #65768 and your ports are out of date? Run sudo port selfupdate to receive the fix.

Ah yup you're right; that fixed it.

Note: See TracTickets for help on using tickets.