#65679 closed defect (fixed)

giflib5 @5.2.1_2 dylib has incorrect install_name

Reported by: jmroot (Joshua Root) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: giflib5

Description

% otool -D /opt/local/lib/giflib5/lib/libgif.dylib 
/opt/local/lib/giflib5/lib/libgif.dylib:
libgif.dylib

Should be the full path to libgif.7.dylib.

Change History (7)

comment:1 Changed 21 months ago by Schamschula (Marius Schamschula)

It's a symlink:

ls -l /opt/local/lib/giflib5/lib/libgif*
-rwxr-xr-x  1 root  admin  54345 Aug 12 10:30 /opt/local/lib/giflib5/lib/libgif.7.2.0.dylib
lrwxr-xr-x  1 root  admin     18 Aug 12 10:30 /opt/local/lib/giflib5/lib/libgif.7.dylib -> libgif.7.2.0.dylib
-rw-r--r--  1 root  admin  38280 Aug 12 10:30 /opt/local/lib/giflib5/lib/libgif.a
lrwxr-xr-x  1 root  admin     14 Aug 12 10:30 /opt/local/lib/giflib5/lib/libgif.dylib -> libgif.7.dylib

comment:2 Changed 21 months ago by Schamschula (Marius Schamschula)

However,

otool -D /opt/local/lib/giflib5/lib/libgif.7.2.0.dylib
/opt/local/lib/giflib5/lib/libgif.7.2.0.dylib:
libgif.dylib

comment:3 Changed 21 months ago by Schamschula (Marius Schamschula)

What is the best way of fixing this?

comment:4 Changed 21 months ago by jmroot (Joshua Root)

Add the appropriate -install_name option to the link command.

comment:5 Changed 21 months ago by Schamschula (Marius Schamschula)

I'm assuming you mean install_name_tool. I'm having a hard time to get it to do what I want. The file that needs to be fixed is libgif.7.2.0.dylib. but the assembled command

install_name_tool -change libgif.dylib "/opt/local/lib/giflib5/lib/libgif.7.2.0.dylib" "/opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_graphics_giflib5/giflib5/work/destroot/opt/local/lib/giflib5/lib/libgif.7.2.0.dylib"

doesn't change anything.

comment:6 in reply to:  5 Changed 21 months ago by jmroot (Joshua Root)

Replying to Schamschula:

I'm assuming you mean install_name_tool.

No, I mean add a flag to the link command in the Makefile. Instead of

$(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) $(OBJECTS) -o $(LIBGIFSO)

use

$(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) -install_name $(LIBDIR)/$(LIBGIFSOMAJOR) $(OBJECTS) -o $(LIBGIFSO)

(and do the equivalent for all other link commands.)

comment:7 Changed 21 months ago by Marius Schamschula <mschamschula@…>

Resolution: fixed
Status: assignedclosed

In 64e084a95051c84c37a29809be4d53b1c8ddeb79/macports-ports (master):

giflib5: fix incorrect install_name

Closes: #65679

Note: See TracTickets for help on using tickets.