[MacPorts] #55603: gmp @6.1.2: port install stuck on configure

MacPorts noreply at macports.org
Fri Dec 29 18:44:38 UTC 2017


#55603: gmp @6.1.2: port install stuck on configure
----------------------+---------------------------------
  Reporter:  roncli   |      Owner:  MarcusCalhoun-Lopez
      Type:  defect   |     Status:  closed
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:  invalid  |   Keywords:
      Port:  gmp      |
----------------------+---------------------------------

Comment (by kencu):

 I think this happens when clang is run as root (such as during your
 attempt to run `sudo ./configure` in the build directory), and then later
 on, you try to run clang as a non-root user.

 clang creates a working folder in `/var/folders/IO` to hold it's
 compilation products. It seems to re-use this folder, and if the
 permissions on that folder get messed up, it gets permissions errors when
 it tries to use it.

 Trying a simple test:
 {{{
 $ clang++ -v -dynamiclib testlib.cpp  -install_name
 @rpath/libtestlib.dylib -current_version 1.0 -o libtestlib.dylib
 clang version 3.9.1 (tags/RELEASE_391/final)
 Target: x86_64-apple-darwin10.8.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-3.9/bin
  "/opt/local/libexec/llvm-3.9/bin/clang" -cc1 -triple x86_64-apple-
 macosx10.6.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage
 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-
 names -main-file-name testlib.cpp -mrelocation-model pic -pic-level 2
 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables
 -target-cpu core2 -target-linker-version 274.2 -v -dwarf-column-info
 -debugger-tuning=lldb -resource-dir
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1 -stdlib=libc++
 -fdeprecated-macro -fdebug-compilation-dir /Users/Shared/Downloads/test-
 meson-libraries-master/src -ferror-limit 19 -fmessage-length 196 -stack-
 protector 1 -fblocks -fobjc-runtime=macosx-10.6.0 -fencode-extended-block-
 signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-
 show-option -fcolor-diagnostics -o
 /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/testlib-a27586.o -x c++
 testlib.cpp
 clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64
 -apple-darwin10.8.0
 ignoring nonexistent directory "/usr/include/c++/v1"
 #include "..." search starts here:
 #include <...> search starts here:
  /opt/local/libexec/llvm-3.9/bin/../include/c++/v1
  /usr/local/include
  /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
  "/opt/local/libexec/llvm-3.9/bin/ld" -demangle -lto_library
 /opt/local/libexec/llvm-3.9/lib/libLTO.dylib -dynamic -dylib
 -dylib_current_version 1.0 -arch x86_64 -dylib_install_name
 @rpath/libtestlib.dylib -macosx_version_min 10.6.0 -o libtestlib.dylib
 /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/testlib-a27586.o -lc++
 -lSystem
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/libclang_rt.osx.a
 }}}

 this folder is created `/var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI`.

 If you change the permissions on that folder to root:
 {{{
 $ sudo chown  -R root:wheel /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI
 }}}
 then it tries to use that same folder over again with the next compile,
 and no surprise, nothing will build:
 {{{
 $ clang++ -v -dynamiclib testlib.cpp  -install_name
 @rpath/libtestlib.dylib -current_version 1.0 -o libtestlib.dylib
 clang version 3.9.1 (tags/RELEASE_391/final)
 Target: x86_64-apple-darwin10.8.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-3.9/bin
 clang: error: unable to make temporary file: Permission denied
 }}}
 deleting that folder allows clang to build again, but interestingly it
 seems to create the exact same temp folder again:

 {{{
 $ clang++ -v -dynamiclib testlib.cpp  -install_name
 @rpath/libtestlib.dylib -current_version 1.0 -o libtestlib.dylib
 clang version 3.9.1 (tags/RELEASE_391/final)
 Target: x86_64-apple-darwin10.8.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-3.9/bin
  "/opt/local/libexec/llvm-3.9/bin/clang" -cc1 -triple x86_64-apple-
 macosx10.6.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage
 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-
 names -main-file-name testlib.cpp -mrelocation-model pic -pic-level 2
 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables
 -target-cpu core2 -target-linker-version 274.2 -v -dwarf-column-info
 -debugger-tuning=lldb -resource-dir
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1 -stdlib=libc++
 -fdeprecated-macro -fdebug-compilation-dir /Users/Shared/Downloads/test-
 meson-libraries-master/src -ferror-limit 19 -fmessage-length 80 -stack-
 protector 1 -fblocks -fobjc-runtime=macosx-10.6.0 -fencode-extended-block-
 signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-
 show-option -fcolor-diagnostics -o
 /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/testlib-57a7d1.o -x c++
 testlib.cpp
 clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64
 -apple-darwin10.8.0
 ignoring nonexistent directory "/usr/include/c++/v1"
 #include "..." search starts here:
 #include <...> search starts here:
  /opt/local/libexec/llvm-3.9/bin/../include/c++/v1
  /usr/local/include
  /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
  "/opt/local/libexec/llvm-3.9/bin/ld" -demangle -lto_library
 /opt/local/libexec/llvm-3.9/lib/libLTO.dylib -dynamic -dylib
 -dylib_current_version 1.0 -arch x86_64 -dylib_install_name
 @rpath/libtestlib.dylib -macosx_version_min 10.6.0 -o libtestlib.dylib
 /var/folders/I0/I0fOotq3ErGZHYxrmmWiqU+++TI/-Tmp-/testlib-57a7d1.o -lc++
 -lSystem
 /opt/local/libexec/llvm-3.9/bin/../lib/clang/3.9.1/lib/darwin/libclang_rt.osx.a
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/55603#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list