Opened 10 years ago

Closed 10 years ago

#45609 closed defect (worksforme)

Builds hang post upgrading to Yosemite

Reported by: john+macports@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port:

Description

This is certainly bizarre. Like everyone who couldn't wait I upgraded to Yosemite. I then pulled the source and recompiled Macports base. All was happy. I think tried to update some of the ports and this happens:

# port -d install bzip2
DEBUG: Copying /Users/XXXX/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/archivers/bzip2
DEBUG: OS darwin/14.0.0 (Mac OS X 10.10) arch i386
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: universal variant already exists, so not adding the default one
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: changing euid/egid - current euid: 0 - current egid: 0
DEBUG: egid changed to: 501
DEBUG: euid changed to: 502
DEBUG: Starting logging for bzip2
DEBUG: bzip2 has no conflicts
DEBUG: Executing org.macports.main (bzip2)
DEBUG: changing euid/egid - current euid: 0 - current egid: 0
DEBUG: egid changed to: 501
DEBUG: euid changed to: 502
DEBUG: Skipping completed org.macports.archivefetch (bzip2)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.fetch (bzip2)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.checksum (bzip2)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.extract (bzip2)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.patch (bzip2)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: Skipping completed org.macports.configure (bzip2)
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: build phase started at Sat Oct 25 18:23:03 JST 2014
--->  Building bzip2
DEBUG: Executing org.macports.build (bzip2)
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.10'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6" && /usr/bin/make -j4 -w all CC="/usr/bin/clang -arch x86_64" PREFIX=/opt/local'
DEBUG: Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6" && /usr/bin/make -j4 -w all CC="/usr/bin/clang -arch x86_64" PREFIX=/opt/local 

.. and it sits there, doing nothing forever. To trouble shoot this I have:

1) Removed /opt/local and reinstalled Macports (this time using the Yosemite pkg)
2) Nuked my Xcode preferences and re-agreed, etc.
3) Run the assembled command by hand (it works fine, the port builds)
4) dtruss'd the hung process, which appears to be make (what..?)

macports        65721   0.0  0.0  2442044    628 s018  S+    6:23PM   0:00.00 /usr/bin/make -j4 -w all CC=/usr/bin/clang -arch x86_64 PREFIX=/opt/local
macports        65720   0.0  0.0  2442588   1024 s018  S+    6:23PM   0:00.05 sh -c  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/work/bzip2-1.0.6" && /usr/bin/make -j4 -w all CC="/usr/bin/clang -arch x86_64" PREFIX=/opt/local 

# dtruss -p 65721
SYSCALL(args) 		 = return

(and nothing)

I've also tried building with a different (new) user to rule out environment variables. I this example I've used bzip2, but it happens for every port. I'm entertaining all sorts of crazy ideas at this point..

Change History (9)

comment:1 Changed 10 years ago by neverpanic (Clemens Lang)

This may be a shot in the dark, but what does xcode-select -print-path print? Did you install the command line tools? Did you accept the Xcode license agreement (sudo xcodebuild -license)?

comment:2 Changed 10 years ago by john+macports@…

$ xcode-select -print-path
/Applications/Xcode.app/Contents/Developer

I did the sudo xcodebuild -license again just for fun; it made no difference. It almost seems like the problem is once the suid to the macports user happens. I've also removed ports, nuked the macports user/group and re-installed again compiling from source. I can't imaging I'm installing incorrectly.

Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 in reply to:  2 Changed 10 years ago by neverpanic (Clemens Lang)

That looks correct. Your installation procedure sounds all right as well. Do you run MacPorts from a root account or do you use sudo?

comment:4 Changed 10 years ago by john+macports@…

Always with sudo $command. It is however 'sudo bash' if I'm going to be doing port wrangling (failed build, etc.). I've since wiped and rebuilt both ways. I've done a dtruss of it, but I'm not seeing anything particularly useful.

comment:5 Changed 10 years ago by john+macports@…

Amusingly enough, I can trigger this again at a different point building pkgconf. This hangs during autoconf, but for the same reason: make
I added -x to configure:

+ printf '%s\n' 'configure:2680: checking whether make sets $(MAKE)'
+ printf %s 'checking whether make sets $(MAKE)... '
checking whether make sets $(MAKE)... + set x make
++ sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'
++ printf '%s\n' make
+ ac_make=make
+ eval '${ac_cv_prog_make_make_set+:}' false
++ false
+ cat
+ case `${MAKE-make} -f conftest.make` in
++ make -f conftest.make

which is here

Roughly line 2692

# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
case `${MAKE-make} -f conftest.make` in
  *@@@%%%=?*=@@@%%%*)
    eval ac_cv_prog_make_${ac_make}_set=yes;;
  *)
    eval ac_cv_prog_make_${ac_make}_set=no;;
esac
rm -f conftest.make
fi

So yet again it looks like there is something strange with make...

macports        99869   0.0  0.3  2577292  26068 s016  S+   11:15AM   0:00.22 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk  -find make
macports        99868   0.0  0.0  2451800    892 s016  S+   11:15AM   0:00.00 sh -c /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk '' -find make 2> /dev/null
macports        99867   0.0  0.0  2433852    620 s016  S+   11:15AM   0:00.00 make -f conftest.make

I may try to completely reinstall Xcode. Make is just in the same = return state.

comment:6 in reply to:  5 Changed 10 years ago by larryv (Lawrence Velázquez)

Make sure you have the Command Line Tools corresponding to your Xcode version and OS X version.

comment:7 in reply to:  description Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to john+macports@…:

I think tried to update some of the ports and this happens:

As mentioned in wiki:Migration, you should uninstall and reinstall all ports, rather than attempting to upgrade the ports one by one.

comment:8 Changed 10 years ago by john+macports@…

I verified the command line tools were the right version. At this point I've completely blown away the entire /opt/local tree and recompiled/installed Macports (more than once). The issue I saw happened regardless of update/install from scratch/port tried. In the end I got tired of this silly game and went for the usual OS X nuclear option.

1) Reboot to recovery mode, repair disk, repair permissions
2) Delete /Applications/Xcode.app re-download, re-install
3) Manually download command line tools from dev.apple.com, install again
4) Wipe then recompile, reinstall macports

.. and joy. I'm honestly not sure what the deal was, but I suspect that since upgrading from 10.8 -> 10.9 -> 10.10 (and all the versions in between) something was unhappy. I'm fairly certain there nothing wrong with the Macports code and I somehow brought this upon myself, so I appreciate the patience and help.

comment:9 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed

I'm sorry we weren't able to pinpoint the problem, but glad you found a way to make it work in the end.

Note: See TracTickets for help on using tickets.