Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#36071 closed defect (duplicate)

llvm-3.1 doesn't build on Mountain Lion

Reported by: ecdowney@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: llvm-3.1

Description (last modified by mf2k (Frank Schima))

Running "sudo port upgrade outdated" on Mac OS X.8.1 and latest xcode, it ran for a while then reported this error then stopped:

Error: Unable to exec port: couldn't open "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/.macports.llvm-3.1.state": permission denied

Oddly, the file permissions look reasonable:

air2: ls -lF /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/.macports.llvm-3.1.state
-rw-r--r--  1 root  wheel  178 Aug 25 15:00 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/.macports.llvm-3.1.state

Repeating the same command, the same error occurred almost immediately.

Attachments (1)

main.log (244.4 KB) - added by ecdowney@… 6 years ago.
log file generated when trying to upgrade llvm-3.1

Download all attachments as: .zip

Change History (10)

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

Description: modified (diff)
Keywords: update outdated removed
Owner: changed from macports-tickets@… to jeremyhu@…
Port: llvm-3.1 added

In the future, please use WikiFormatting, fill in the Port field of the failed port and Cc the maintainer(s) of that port.

Repeating the same command won't change anything. You need to clean llvm-3.1 first and then try again.

sudo port clean llvm-3.1
sudo port upgrade outdated

comment:2 Changed 6 years ago by ecdowney@…

Thanks much for the quick reply. Those two commands provided some progress. Unfortunately, llvm now fails later on in a different way. Checking the log file referred to in the error report, it looks like some bugs in the build script. I'm not the least interested in llvm, I just want to update all my ports in general.

Sorry I didn't understand the situation very well, from the error message it didn't even occur to me llvm in that long path was referring to a port. Even so, port info llvm reports the maintainer as nomaintainer@… so I seem to be stuck again or if there is a way to just ignore this package that would be fine with me.

comment:3 Changed 6 years ago by jeremyhu (Jeremy Huddleston Sequoia)

llvm isn't the port. It's llvm-3.1.

Please provide the log, so I can see what the error is that you're seeing.

The only real change to llvm-3.1 is that it's now built with --enable-pic. The Portfile was reworked quite a bit, but that's the only functional difference.

comment:4 Changed 6 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Summary: error during port upgrade outdatedllvm-3.1 doesn't build on Mountain Lion

comment:5 in reply to:  3 Changed 6 years ago by ecdowney@…

Replying to jeremyhu@…:

llvm isn't the port. It's llvm-3.1.

Please provide the log, so I can see what the error is that you're seeing.

The only real change to llvm-3.1 is that it's now built with --enable-pic. The Portfile was reworked quite a bit, but that's the only functional difference.

Given the command "sudo port upgrade outdated" the last portion just before it ends reads as follows:

--->  Computing dependencies for llvm-3.1
--->  Fetching archive for llvm-3.1
--->  Attempting to fetch llvm-3.1-3.1_3.darwin_12.x86_64.tbz2 from http://packages.macports.org/llvm-3.1
--->  Attempting to fetch llvm-3.1-3.1_3.darwin_12.x86_64.tbz2 from http://lil.fr.packages.macports.org/llvm-3.1
--->  Attempting to fetch llvm-3.1-3.1_3.darwin_12.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/llvm-3.1
--->  Fetching distfiles for llvm-3.1
--->  Verifying checksum(s) for llvm-3.1
--->  Extracting llvm-3.1
--->  Applying patches to llvm-3.1
--->  Configuring llvm-3.1
--->  Building llvm-3.1
Error: org.macports.build for port llvm-3.1 returned: command execution failed
Please see the log file for port llvm-3.1 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/main.log
Error: Problem while installing llvm-3.1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

The log file mentioned is over 6500 lines so I won't paste it all here, but only the last portion where things start to go badly:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/utils/llvm-build/llvm-build \
:info:build       --native-target "x86_64" \
:info:build       --enable-targets "X86 Sparc PowerPC ARM Mips CellSPU XCore MSP430 CppBackend MBlaze PTX Hexagon" \
:info:build       --enable-optional-components "" \
:info:build       --write-library-table /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/LibraryDependencies.inc \
:info:build       --write-make-fragment /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/Makefile.llvmbuild
:info:build Traceback (most recent call last):
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/utils/llvm-build/llvm-build", line 3, in <module>
:info:build     import llvmbuild
:info:build   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/utils/llvm-build/llvmbuild/__init__.py", line 1, in <module>
:info:build     from main import main
:info:build ImportError: No module named main
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/autoconf/mkinstalldirs /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts > /dev/null
:info:build /bin/date > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/.dir
:info:build llvm[1]: Building llvm-config BuildVariables.inc file.
:info:build echo 's/@LLVM_SRC_ROOT@/\/opt\/local\/var\/macports\/build\/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1\/llvm-3.1\/work\/llvm-3.1.src/' \
:info:build       > temp.sed
:info:build echo 's/@LLVM_OBJ_ROOT@/\/opt\/local\/var\/macports\/build\/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1\/llvm-3.1\/work\/llvm-3.1.src/' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_CPPFLAGS@/ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS/' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_CFLAGS@/ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3  -g -fno-common/' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_CXXFLAGS@/ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3  -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual/' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_LDFLAGS@//' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_BUILDMODE@/Release+Debug+Asserts/' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_SYSTEM_LIBS@/-lpthread -lffi -lm /' \
:info:build       >> temp.sed
:info:build echo 's/@LLVM_TARGETS_BUILT@/X86 Sparc PowerPC ARM Mips CellSPU XCore MSP430 CppBackend MBlaze PTX Hexagon/' \
:info:build       >> temp.sed
:info:build /usr/bin/sed -f temp.sed < /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/BuildVariables.inc.in > /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/BuildVariables.inc
:info:build /bin/rm temp.sed
:info:build llvm[1]: Compiling llvm-config.cpp for Release+Debug+Asserts build
:info:build if  /usr/bin/clang++ -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config  -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts -O3  -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual   -m64 -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings  -Wcovered-switch-default -c -MMD -MP -MF "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.d.tmp" -MT "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.o" -MT "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.d" llvm-config.cpp -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.o ; \
:info:build             then /bin/mv -f "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.d.tmp" "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.d"; else /bin/rm "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.d.tmp"; exit 1; fi
:info:build llvm-config.cpp:45:10: fatal error: 'LibraryDependencies.inc' file not found
:info:build #include "LibraryDependencies.inc"
:info:build          ^
:info:build 1 error generated.
:info:build rm: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.d.tmp: No such file or directory
:info:build make[1]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config/Release+Debug+Asserts/llvm-config.o] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src/tools/llvm-config'
:info:build make: *** [all] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/work/llvm-3.1.src" && /usr/bin/make -j8 -w all 
:info:build Exit code: 2
:error:build org.macports.build for port llvm-3.1 returned: command execution failed
:debug:build Error code: CHILDSTATUS 7377 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: targets not executed for llvm-3.1: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port llvm-3.1 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/llvm-3.1/main.log
Last edited 6 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:6 Changed 6 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Please use wiki formatting to make that readable in the future.

Please attach the full main.log to the radar.

Changed 6 years ago by ecdowney@…

Attachment: main.log added

log file generated when trying to upgrade llvm-3.1

comment:7 Changed 6 years ago by ecdowney@…

Ok, main.log is attached. Thanks for your continued help (and patience with me).

comment:8 Changed 6 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: duplicate
Status: newclosed

I see a bunch of python errors. This is probably a dupe of #32575.

If you have any issues after switching to python2, please open a new ticket.

comment:9 Changed 6 years ago by ecdowney@…

Please note that this happening on a new MacBook retina display running Mountain Lion as delivered and updated to 10.8.1. I have to say it seems rather disappointing that macports is requiring installation of special versions of tools. Having said that, it appears I am already running python 2:

ecdmbp: python --version
Python 2.7.2

Note: See TracTickets for help on using tickets.