Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#14365 closed defect (fixed)

Boost build does not properly symlink boost libs

Reported by: dane.springmeyer@… Owned by: macports-tickets@…
Priority: High Milestone:
Component: ports Version: 1.6.0
Keywords: boost symlink libs .dylib Cc: sanchom (Sancho McCann)
Port:

Description

The Port install of Boost 1_34_1 places 208 libboost* library files in /opt/local/lib. For each boost library 4 .dylib files are created and another 8 symlinks/aliases to those dynamic libraries.

After installing boost using macports on 10.5.2 using the workaround for the boost bug here:

it appears that all the symlinks created point to a screwy location. For example here is the output of the ls command for the libboost_filesystem:

springmeyer:lib spring$ ls -l libboost_filesystem*
-rw-r--r--  2 root  admin   81996 Feb 17 10:59 libboost_filesystem-1_34_1.a
-rwxr-xr-x  2 root  admin   55432 Feb 17 10:59 libboost_filesystem-1_34_1.dylib
-rw-r--r--  2 root  admin  491252 Feb 17 10:59 libboost_filesystem-d-1_34_1.a
-rwxr-xr-x  2 root  admin  135880 Feb 17 10:59 libboost_filesystem-d-1_34_1.dylib
lrwxr-xr-x  1 root  admin     165 Feb 17 11:00 libboost_filesystem-d.a -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/destroot/opt/local/lib/libboost_filesystem-d-1_34_1.a
lrwxr-xr-x  1 root  admin     169 Feb 17 11:00 libboost_filesystem-d.dylib -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/destroot/opt/local/lib/libboost_filesystem-d-1_34_1.dylib
-rw-r--r--  2 root  admin   81996 Feb 17 10:59 libboost_filesystem-mt-1_34_1.a
-rwxr-xr-x  2 root  admin   55432 Feb 17 10:59 libboost_filesystem-mt-1_34_1.dylib
-rw-r--r--  2 root  admin  491252 Feb 17 10:59 libboost_filesystem-mt-d-1_34_1.a
-rwxr-xr-x  2 root  admin  135960 Feb 17 10:59 libboost_filesystem-mt-d-1_34_1.dylib
lrwxr-xr-x  1 root  admin     168 Feb 17 11:00 libboost_filesystem-mt-d.a -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/destroot/opt/local/lib/libboost_filesystem-mt-d-1_34_1.a
lrwxr-xr-x  1 root  admin     172 Feb 17 11:00 libboost_filesystem-mt-d.dylib -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/destroot/opt/local/lib/libboost_filesystem-mt-d-1_34_1.dylib
lrwxr-xr-x  1 root  admin     166 Feb 17 11:00 libboost_filesystem-mt.a -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/destroot/opt/local/lib/libboost_filesystem-mt-1_34_1.a
lrwxr-xr-x  1 root  admin      35 Feb 17 11:50 libboost_filesystem-mt.dylib -> libboost_filesystem-mt-1_34_1.dylib
lrwxr-xr-x  1 root  admin     163 Feb 17 11:00 libboost_filesystem.a -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_boost/work/destroot/opt/local/lib/libboost_filesystem-1_34_1.a
lrwxr-xr-x  1 root  admin      35 Feb 17 11:54 libboost_filesystem.dylib -> libboost_filesystem-mt-1_34_1.dylib

Attachments (1)

Portfile-boost.diff (2.3 KB) - added by gui-dos (Guido Soranzio) 16 years ago.
Create relative links by using [file tail] of ${lib}

Download all attachments as: .zip

Change History (8)

comment:1 Changed 16 years ago by raimue (Rainer Müller)

r13223 broke this for Leopard.
platform darwin {} is no longer evaluated as it is superseeded by platform darwin 9 {}

comment:2 Changed 16 years ago by gui-dos (Guido Soranzio)

That's not the problem: "darwin" and "darwin 9" can both be present in the same portfile.

The problem is that in the line

system "cd  ${destroot}${prefix}/lib;ln -s ${lib} ${liblink}"

${lib} is the full path of the library, therefore the created link isn't relative.

${libname} should be used instead and its definition should use the "file tail" command, not the "file rootname", otherwise even liblink includes the full path since it is defined as "${libname}${libext}"

comment:3 Changed 16 years ago by dane.springmeyer@…

Nice find, that makes sense from what I am experiencing.

So is this an easy thing to fix or can you post a workaround for temporary correction of the Symlinks? Maybe a bash script to find every library and re-write the symlinks?

comment:4 Changed 16 years ago by gui-dos (Guido Soranzio)

I have attached a diff for the portfile which uses the "tail" of the paths to create realtive links.

I have tested it only with the "date_time" library but it should work globally; it should solve also #14388:

ls -l /opt/local/lib/libboost_date_time*

-rw-r--r--  2 root  admin   92248 Feb 21 18:46 /opt/local/lib/libboost_date_time-1_34_1.a
-rwxr-xr-x  2 root  admin   53640 Feb 21 18:47 /opt/local/lib/libboost_date_time-1_34_1.dylib
-rw-r--r--  2 root  admin  428856 Feb 21 18:46 /opt/local/lib/libboost_date_time-d-1_34_1.a
-rwxr-xr-x  2 root  admin  152172 Feb 21 18:47 /opt/local/lib/libboost_date_time-d-1_34_1.dylib
lrwxr-xr-x  1 root  admin      29 Feb 21 18:56 /opt/local/lib/libboost_date_time-d.a -> libboost_date_time-d-1_34_1.a
lrwxr-xr-x  1 root  admin      33 Feb 21 18:56 /opt/local/lib/libboost_date_time-d.dylib -> libboost_date_time-d-1_34_1.dylib
-rw-r--r--  2 root  admin   92248 Feb 21 18:46 /opt/local/lib/libboost_date_time-mt-1_34_1.a
-rwxr-xr-x  2 root  admin   53640 Feb 21 18:47 /opt/local/lib/libboost_date_time-mt-1_34_1.dylib
-rw-r--r--  2 root  admin  428856 Feb 21 18:46 /opt/local/lib/libboost_date_time-mt-d-1_34_1.a
-rwxr-xr-x  2 root  admin  152220 Feb 21 18:47 /opt/local/lib/libboost_date_time-mt-d-1_34_1.dylib
lrwxr-xr-x  1 root  admin      32 Feb 21 18:56 /opt/local/lib/libboost_date_time-mt-d.a -> libboost_date_time-mt-d-1_34_1.a
lrwxr-xr-x  1 root  admin      36 Feb 21 18:56 /opt/local/lib/libboost_date_time-mt-d.dylib -> libboost_date_time-mt-d-1_34_1.dylib
lrwxr-xr-x  1 root  admin      30 Feb 21 18:56 /opt/local/lib/libboost_date_time-mt.a -> libboost_date_time-mt-1_34_1.a
lrwxr-xr-x  1 root  admin      34 Feb 21 18:56 /opt/local/lib/libboost_date_time-mt.dylib -> libboost_date_time-mt-1_34_1.dylib
lrwxr-xr-x  1 root  admin      27 Feb 21 18:56 /opt/local/lib/libboost_date_time.a -> libboost_date_time-1_34_1.a
lrwxr-xr-x  1 root  admin      31 Feb 21 18:56 /opt/local/lib/libboost_date_time.dylib -> libboost_date_time-1_34_1.dylib

Changed 16 years ago by gui-dos (Guido Soranzio)

Attachment: Portfile-boost.diff added

Create relative links by using [file tail] of ${lib}

comment:5 Changed 16 years ago by sanchom (Sancho McCann)

Thank you! This should be committed.

comment:6 Changed 16 years ago by gui-dos (Guido Soranzio)

Resolution: fixed
Status: newclosed

Fixed in r34338.

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.