Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#55979 closed defect (fixed)

libmpdclient @2.14_0 fails to build on mavericks

Reported by: tehcog (tehcog) Owned by: lbschenkel (Leonardo Brondani Schenkel)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: mavericks Cc: lbschenkel@…
Port: libmpdclient

Description

main.log:

version:1
:debug:main Executing org.macports.main (libmpdclient)
:debug:main dropping privileges: euid changed to 502, egid changed to 501.
:debug:fetch fetch phase started at Tue Mar  6 16:04:45 EST 2018
:notice:fetch --->  Fetching distfiles for libmpdclient
:debug:fetch Executing org.macports.fetch (libmpdclient)
version:1
:debug:main libmpdclient has no conflicts
:debug:main Executing org.macports.main (libmpdclient)
:debug:main dropping privileges: euid changed to 502, egid changed to 501.
:debug:archivefetch archivefetch phase started at Tue Mar  6 16:04:46 EST 2018
:msg:archivefetch --->  Fetching archive for libmpdclient
:debug:archivefetch Executing org.macports.archivefetch (libmpdclient)
:debug:archivefetch euid/egid changed to: 0/0
:debug:archivefetch chowned /opt/local/var/macports/incoming to macports
:debug:archivefetch euid/egid changed to: 502/501
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.fetch (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.checksum (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.extract (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.patch (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.configure (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.build (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:archivefetch Skipping completed org.macports.destroot (libmpdclient)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.
:debug:install install phase started at Tue Mar  6 16:04:46 EST 2018
:notice:install --->  Installing libmpdclient @2.14_0
:debug:install elevating privileges for install: euid changed to 0, egid changed to 0.
:debug:install Executing proc-pre-org.macports.install-install-0
:error:install Failed to install libmpdclient: error: install_name_tool: can't open file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/work/destroot/opt/local/lib/libmpdclient.2.dylib (No such file or directory)
:debug:install Error code: NONE
:debug:install Backtrace: error: install_name_tool: can't open file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/work/destroot/opt/local/lib/libmpdclient.2.dylib (No such file or directory)
:debug:install     while executing
:debug:install "$pre $targetname"
:error:install See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/main.log for details.

Attachments (2)

terminal_output.txt (21.2 KB) - added by tehcog (tehcog) 6 years ago.
terminal output
build.log (19.7 KB) - added by tehcog (tehcog) 6 years ago.
build.log

Download all attachments as: .zip

Change History (15)

comment:1 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

It would be useful to be able to see the debug log for the destroot phase in order to see which files ended up being built in your system.

comment:2 Changed 6 years ago by tehcog (tehcog)

sorry, is this what you wanted to see? If not, please advise. Thanks for your help.

sudo port -d upgrade libmpdclient
Password:
DEBUG: Copying /Users/dleece/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
DEBUG: epoch: in tree: 0 installed: 0
DEBUG: libmpdclient 2.14_0 exists in the ports tree
DEBUG: libmpdclient 2.10_0  is the latest installed
DEBUG: libmpdclient 2.10_0  is active
DEBUG: Merging existing variants '' into variants
DEBUG: new fully merged portvariants:
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/audio/libmpdclient
DEBUG: OS darwin/13.4.0 (Mac OS X 10.9) arch i386
DEBUG: Re-registering default for configure.cmd
DEBUG: Re-registering default for build.dir
DEBUG: Re-registering default for build.cmd
DEBUG: Re-registering default for build.target
DEBUG: Re-registering default for destroot.post_args
DEBUG: Sourcing PortGroup meson 1.0 from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/meson-1.0.tcl
DEBUG: adding the default universal variant
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Finished running callback portconfigure::add_automatic_compiler_dependencies
DEBUG: Running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: Finished running callback portbuild::add_automatic_buildsystem_dependencies
DEBUG: dropping privileges: euid changed to 502, egid changed to 501.
DEBUG: Starting logging for libmpdclient
DEBUG: libmpdclient has no conflicts
DEBUG: Executing org.macports.main (libmpdclient)
DEBUG: dropping privileges: euid changed to 502, egid changed to 501.
DEBUG: Skipping completed org.macports.archivefetch (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.fetch (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.checksum (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.extract (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.patch (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.configure (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.build (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.destroot (libmpdclient)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: install phase started at Tue Mar  6 16:27:36 EST 2018
--->  Installing libmpdclient @2.14_0
DEBUG: elevating privileges for install: euid changed to 0, egid changed to 0.
DEBUG: Executing proc-pre-org.macports.install-install-0
Error: Failed to install libmpdclient: error: install_name_tool: can't open file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/work/destroot/opt/local/lib/libmpdclient.2.dylib (No such file or directory)
DEBUG: Error code: NONE
DEBUG: Backtrace: error: install_name_tool: can't open file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/work/destroot/opt/local/lib/libmpdclient.2.dylib (No such file or directory)
    while executing
"$pre $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/main.log for details.
DEBUG: invalid command name "::ui_init"
    while executing
"::ui_init $priority $prefix $channels($priority) {*}$args"
    ("uplevel" body line 2)
    invoked from within
"uplevel 1 $body"
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

comment:3 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Please run sudo port -d destroot libmpdclient 2>&1 > build.log and attach build.log here.

comment:4 in reply to:  3 Changed 6 years ago by tehcog (tehcog)

Replying to lbschenkel:

Please run sudo port -d destroot libmpdclient 2>&1 > build.log and attach build.log here.

I have attached both 'build.log' and the terminal output as the build.log only contains one line.

Changed 6 years ago by tehcog (tehcog)

Attachment: terminal_output.txt added

terminal output

comment:5 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Sorry, I made a typo. I meant 2&>1 and not 2>&1, but by looking at the terminal output I can see that you need to run clean as well, in order to force MacPorts to rebuild the port (otherwise I don't see the output that I need). So:

sudo port clean libmpdclient
sudo port -d destroot libmpdclient 2&>1 > build.log

and attach build.log again. Feel free to overwrite the first one.

Changed 6 years ago by tehcog (tehcog)

Attachment: build.log added

build.log

comment:6 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

I honestly cannot explain what's happening in your system. I can see in the log that at the end of the build, the dynamic library is being copied to

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/work/destroot/opt/local/lib/libmpdclient.2.dylib

and then just before installing, in your machine the build fails because

install_name_tool: can't open file: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_libmpdclient/libmpdclient/work/destroot/opt/local/lib/libmpdclient.2.dylib (No such file or directory)

which is the exact same file not being found. I believe I'll need help from somebody more knowledgeable than me. I'll try asking around in the mailing list during this week.

comment:7 Changed 6 years ago by ctreleaven (Craig Treleaven)

I think the problem is running install_name_tool in the pre-install block and attempting to modify something in the destroot. By that point, the destroot has been archived and the destroot files no longer exist. Perhaps you'll have more success if you can pre-install to post-destroot?

comment:8 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Thanks Craig. Makes sense. The strange thing is that it works on my system and the build slaves. Anyway, I agree that post-destroot is more correct. I have made the change and tested it on my machine.

Before I push the change, since it will auto-close this ticket, I would like tehcog to test the same change locally just to make sure it solves it for him. Please try the following:

  1. sudo port edit libmpdclient
  2. There is a line near the end saying pre-install {, change it to post-destroot {
  3. Save the file
  4. Run sudo port install libmpdclient

Let me know if that worked. (If you screw up editing, a sudo port sync will restore the file as it was so you can undo/retry.)

comment:9 in reply to:  8 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to lbschenkel:

Thanks Craig. Makes sense. The strange thing is that it works on my system and the build slaves.

It will succeed for from-source builds, and fail for binary installs.

Anyway, I agree that post-destroot is more correct. I have made the change and tested it on my machine.

Please do commit that.

Please also use system instead of exec.

comment:10 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Owner: set to lbschenkel
Resolution: fixed
Status: newclosed

In 45f54008ff3576b3dcc7b8ea99642997859129a6/macports-ports:

libmpdclient: fix @rpath removal, do it in post-destroot

Closes: #55979

comment:11 Changed 6 years ago by lbschenkel (Leonardo Brondani Schenkel)

Actually I realized I should have bumped the revision as well, to force a rebuild on the slaves. Isn't that so, Ryan?

comment:12 Changed 6 years ago by mf2k (Frank Schima)

There is no need for a revision bump. Changing the Portfile causes a rebuild on the buildbot.

comment:13 Changed 6 years ago by tehcog (tehcog)

Thanks! Seems to work.

Note: See TracTickets for help on using tickets.