Opened 8 years ago

Closed 8 years ago

#53110 closed defect (fixed)

libomp and clang-3.8 fail on Lion

Reported by: RobK88 Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.5
Keywords: Cc: eborisch@…, jeremyhu@…, larryv@…
Port: libomp, clang-3.8

Description

Ran "sudo port -v selfupdate". Updated macports to the latest version on my Mac running 10.7.5.

I then tried to update the outdated packages. Macports updated many of them but then started to fail.

E.G. When I try to install libomp or clang-3.8 on Lion, it fails. Looks like there is a circular dependency.

sudo port clean libomp clang-3.8

--->  Cleaning libomp
--->  Cleaning clang-3.8

Grinchs-Mac-Pro:~ grinch$ sudo port install libomp
--->  Computing dependencies for libomp
--->  Dependencies to be installed: clang-3.8 libomp
Error: The following dependencies were not installed: clang-3.8 libomp
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libomp failed

Grinchs-Mac-Pro:~ grinch$ 
Grinchs-Mac-Pro:~ grinch$ sudo port install clang-3.8
--->  Computing dependencies for clang-3.8
--->  Dependencies to be installed: libomp clang-3.8
Error: The following dependencies were not installed: libomp clang-3.8
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port clang-3.8 failed

Any ideas for a fix?

Attachments (2)

libomp.main.log (28.6 KB) - added by RobK88 8 years ago.
clang-3.8.main.log (63.0 KB) - added by RobK88 8 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 8 years ago by kencu (Ken)

Not quite enough information for me to help you. What do you have installed already?

port -v installed | grep omp
port -v installed | grep clang
port -v installed | grep llvm
port -v installed | grep libcxx
port -v installed | grep libmacho
port -v installed | grep libunwind

are you using libcxx as per LibcxxOnOlderSystems or the standard libstdc++ default installation?

and would need the full log

sudo port -v install omp
sudo port -v install clang-3.8

best, K

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Circular dependency.

Changed 8 years ago by RobK88

Attachment: libomp.main.log added

Changed 8 years ago by RobK88

Attachment: clang-3.8.main.log added

comment:3 Changed 8 years ago by RobK88

I am using libcc++.

I have attached the main.log files for the failed installations of libomp and clang-3.8

Here is output of the commands:

bash-3.2$ port -v installed | grep omp
bash-3.2$ port -v installed | grep clang
  clang-3.4 @3.4.2_12+analyzer+arm_runtime (active) platform='darwin 11' archs='x86_64'
  clang-3.6 @3.6.2_5+analyzer (active) platform='darwin 11' archs='x86_64'
  clang-3.7 @3.7.1_5+analyzer (active) platform='darwin 11' archs='x86_64'
  clang_select @2_0 (active) platform='darwin 11' archs='noarch'
bash-3.2$ port -v installed | grep llvm
  cctools @895_2+llvm34 (active) platform='darwin 11' archs='x86_64'
  ld64-latest @274.1_0+llvm34 (active) platform='darwin 11' archs='x86_64'
  llvm-3.4 @3.4.2_11 (active) platform='darwin 11' archs='x86_64'
  llvm-3.6 @3.6.2_4 (active) platform='darwin 11' archs='x86_64'
  llvm-3.7 @3.7.1_4 (active) platform='darwin 11' archs='x86_64'
  llvm-3.8 @3.8.1_0 (active) platform='darwin 11' archs='x86_64'
  llvm_select @2_0 (active) platform='darwin 11' archs='noarch'
bash-3.2$ port -v installed | grep libcxx
  libcxx @3.9.0_0+universal (active) platform='darwin 11' archs='i386 x86_64'
bash-3.2$ port -v installed | grep libmacho
  libmacho-headers @895_0 (active) platform='darwin 11' archs='noarch'
bash-3.2$ port -v installed | grep libunwind
  libunwind-headers @3.9.0_0 (active) platform='darwin 11' archs='noarch'
bash-3.2$ 

bash-3.2$ sudo port -v install libomp
--->  Computing dependencies for libomp....
--->  Dependencies to be installed: clang-3.8 libomp
Error: The following dependencies were not installed: clang-3.8 libomp
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libomp failed

bash-3.2$ sudo port -v install clang-3.8
--->  Computing dependencies for clang-3.8...
--->  Dependencies to be installed: libomp clang-3.8
Error: The following dependencies were not installed: libomp clang-3.8
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port clang-3.8 failed
bash-3.2$ 

Hope you can see a fix.

comment:4 Changed 8 years ago by kencu (Ken)

Try this:

sudo port -v install libomp configure.compiler=macports-clang-3.7

comment:5 Changed 8 years ago by kencu (Ken)

If that doesn't work, I would try editing /opt/local/etc/macports/macports.conf and change the default compiler to clang-3.7

default_compilers       macports-clang-3.7 macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0

then update libomp

and then change them back to

default_compilers       macports-clang-3.8 macports-clang-3.4 macports-clang-3.3 gcc-4.2 apple-gcc-4.2 gcc-4.0

which is where I presume you have them now.

Version 2, edited 8 years ago by kencu (Ken) (previous) (next) (diff)

comment:6 Changed 8 years ago by RobK88

I ran:

sudo port -v install libomp configure.compiler=macports-clang-3.7

It worked. libomp compiled and was installed.

Then I ran:

sudo port -v install clang-3.8

Clang-3.8 was compiled and installed.

Do I need to recompile libomp with clang-3.8? If so, how would I do this.

And finally, I ran:

sodo port upgrade outdated

All my outdated packages were upgraded. (But there was one broken package -- speex. Looks liked a dependency issue with ffmpeg. But the package was automatically uninstalled, deactivated etc and there were no broken packages at the end).

So my system looks like it is finally updated.

Many thanks for all your help.

comment:7 Changed 8 years ago by kencu (Ken)

I don't think you need to rebuild libomp with clang-3.8. The version you built should be fine.

Glad it worked! -- K

comment:8 Changed 8 years ago by RobK88

Thanks again for all your help.

comment:9 Changed 8 years ago by eborisch (Eric A. Borisch)

How's this look for fixing this?

@@ -67,8 +67,19 @@ if {${subport} ne ${name}} {

 cmake.out_of_source     yes

-# According to documentation builds with clang >= 3.3
-compiler.blacklist-append {clang < 500} *gcc*
+# According to documentation builds with clang >= 3.3, but macports-clang-3.x
+# for x >= 8 depend on this port. Avoid circular dependencies.
+if {[vercmp $xcodeversion 5.0] >= 0} {
+    # Use the system compiler and have no extra build deps.
+    configure.compiler          clang
+} else {
+    # Install a clang from MP that we can use to build.
+    compiler.whitelist          macports-clang-3.7 \
+                                macports-clang-3.6 \
+                                macports-clang-3.5 \
+                                macports-clang-3.4 \
+                                macports-clang-3.3
+}

 default_variants        +universal

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

Don't use clang-3.3. It's only purpose for existing is bootstrapping newer clang on Leopard and webkit-gtk-2.0.

I suggest you blacklist based on whether or not the compiler is installed, similar to what we do in the llvm ports:

foreach ver {3.8 3.9 devel} {
    if {![file exists ${prefix}/bin/clang-mp-${ver}]} {
        compiler.blacklist-append macports-clang-${ver}
    }
}

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

Owner: set to jeremyhu
Resolution: fixed
Status: newclosed

In 2d700e8b/macports-ports:

libomp: Avoid dependency cycle with clang ports

Fixes #53110

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@…>

Note: See TracTickets for help on using tickets.