Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#65768 closed defect (fixed)

libsdl: dylib compatibility version changed from 12 to 1, breaking existing binaries

Reported by: catap (Kirill A. Korinsky) Owned by: jmroot (Joshua Root)
Priority: High Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: mascguy (Christopher Nielsen)
Port: sdl12-compat libsdl

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Seems that update of libsdl at [ddff16416716aaf2a1c522f7f94301e9f4df6496/macports-ports] had broken a lot of ports.

For example on macOS 12:

sudo port install --unrequested smpeg
--->  Computing dependencies for smpeg
The following dependencies will be installed: 
 libsdl
 sdl12-compat
Continue? [Y/n]: y
--->  Fetching archive for sdl12-compat
--->  Attempting to fetch sdl12-compat-1.2.52_1.darwin_21.x86_64.tbz2 from https://packages.macports.org/sdl12-compat
--->  Attempting to fetch sdl12-compat-1.2.52_1.darwin_21.x86_64.tbz2.rmd160 from https://packages.macports.org/sdl12-compat
--->  Installing sdl12-compat @1.2.52_1
--->  Activating sdl12-compat @1.2.52_1
--->  Cleaning sdl12-compat
--->  Fetching archive for libsdl
--->  Attempting to fetch libsdl-1.2.15-20220801_1+compat.darwin_21.x86_64.tbz2 from https://packages.macports.org/libsdl
--->  Attempting to fetch libsdl-1.2.15-20220801_1+compat.darwin_21.x86_64.tbz2.rmd160 from https://packages.macports.org/libsdl
--->  Installing libsdl @1.2.15-20220801_1+compat
--->  Activating libsdl @1.2.15-20220801_1+compat
--->  Cleaning libsdl
--->  Fetching archive for smpeg
--->  Attempting to fetch smpeg-0.4.4_9.darwin_21.x86_64.tbz2 from https://packages.macports.org/smpeg
--->  Attempting to fetch smpeg-0.4.4_9.darwin_21.x86_64.tbz2.rmd160 from https://packages.macports.org/smpeg
--->  Installing smpeg @0.4.4_9
--->  Activating smpeg @0.4.4_9
--->  Cleaning smpeg
--->  Scanning binaries for linking errors
--->  Found 2 broken files, matching files to ports      
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: smpeg @0.4.4
Continue? [Y/n]: 

The same issue happens with libsdl_sound, libsdl_image and looks like that each prebuilt port which depends on libsdl

Change History (10)

comment:1 Changed 20 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:2 Changed 20 months ago by mascguy (Christopher Nielsen)

Yep, I'm seeing the same types of things locally, with buildbot binaries like libsdl_gfx:

$ sudo port -v rev-upgrade
--->  Scanning binaries for linking errors
Incompatible library version: /opt/local/lib/libSDL_gfx.14.dylib requires version 12.0.0 or later, but /opt/local/lib/libSDL-1.2.0.dylib provides version 1.0.0
--->  Found 1 broken file, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: libsdl_gfx @2.0.24

comment:3 Changed 20 months ago by catap (Kirill A. Korinsky)

Christopher, and libsdl_ttf is broken and rev-upgrade can't fix it :)

comment:4 Changed 20 months ago by mascguy (Christopher Nielsen)

Summary: Update of libsdl brokes tons of portslibsdl: dylib major version changed from 12 to 1, breaking existing binaries

comment:5 Changed 20 months ago by mascguy (Christopher Nielsen)

Port: libsdl added
Version: 2.7.2

comment:6 Changed 20 months ago by jmroot (Joshua Root)

So, fun fact, dyld apparently doesn't check this stuff any more on macOS 12. There's no runtime error for an incompatible compatibility_version.

comment:7 Changed 20 months ago by jmroot (Joshua Root)

Port: sdl12-compat added
Summary: libsdl: dylib major version changed from 12 to 1, breaking existing binarieslibsdl: dylib compatibility version changed from 12 to 1, breaking existing binaries

The major version and the current_version didn't change, BTW.

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

Resolution: fixed
Status: assignedclosed

In 0843dc45c69fe0da151dce607f048144087a345e/macports-ports (master):

sdl12-compat: fix lib compatibility_version

Also adopt alternative SDL_stdinc.h that was accepted upstream.

Fixes: #65768

comment:9 in reply to:  8 Changed 20 months ago by mascguy (Christopher Nielsen)

Replying to jmroot:

sdl12-compat: fix lib compatibility_version

Ah, for some reason I was thinking it was major_version, but didn't consider compatibility_version. Still learning...

comment:10 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Note: See TracTickets for help on using tickets.