Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#54642 closed defect (fixed)

mesa@17.1.6: error: Could not find llvm shared libraries

Reported by: chicagotripp (Altoine Barker) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: mesa

Description

Mesa fails to build with the following error message:

DEBUG: Failed to locate 'lbzip2' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
    while executing
"error "$eMessage or at its MacPorts configuration time location, did you move it?""
    invoked from within
"try -pass_signal {
            set cmd_path [macports::binaryInPath $prog]
            return $cmd_path
        } catch {{*} eCode eMessage} {
       ..."
    (procedure "macports::findBinary" line 5)
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Here are the steps of what I have to help resolve this issue: port select llvm Output:

Available versions for llvm:
	mp-llvm-3.7
	mp-llvm-3.8
	mp-llvm-3.9
	mp-llvm-4.0 (active)
	none

port info mp-llvm-4.0 Output:

Error: Port mp-llvm-4.0 not found

port installed | grep llvm

  cctools @895_4+llvm39 (active)
  ld64-latest @274.2_1+llvm39 (active)
  llvm-3.7 @3.7.1_4 (active)
  llvm-3.8 @3.8.1_3 (active)
  llvm-3.9 @3.9.1_3 (active)
  llvm-4.0 @4.0.1_0 (active)
  llvm_select @2_0 (active)

port info llvm-4.0

llvm-4.0 @4.0.1 (lang)
Sub-ports:            clang-4.0, lldb-4.0
Variants:             assertions, debug, ocaml, polly, universal

Description:          The LLVM Core libraries provide a modern source- and target-independent optimizer, along with code generation support for many popular CPUs (as well as some less common ones!) These libraries are built around a well specified code representation known as the LLVM intermediate representation ("LLVM IR").
Homepage:             http://llvm.org/

Extract Dependencies: xz
Build Dependencies:   cmake
Library Dependencies: libedit, libffi, ncurses, xar, zlib, libcxx
Runtime Dependencies: perl5, llvm_select
Platforms:            darwin
License:              NCSA
Maintainers:          Email: jeremyhu@macports.org, GitHub: jeremyhu
Email: larryv@macports.org

uname -m

Output: x86_64

uname -r

Output: 16.7.0

I am including the config.log and the main.log. I hope this information proves to be helpful.

Attachments (4)

Mesa_main.log (30.5 KB) - added by chicagotripp (Altoine Barker) 7 years ago.
Mesa main.log
Mesa_config.log (151.6 KB) - added by chicagotripp (Altoine Barker) 7 years ago.
Mesa config.log
Mesa_lbzip2_main.log (30.5 KB) - added by chicagotripp (Altoine Barker) 7 years ago.
Mesa main.log after installing lbzip2
Mesa_lbzip2_config.log (151.6 KB) - added by chicagotripp (Altoine Barker) 7 years ago.
Mesa config.log after installing lbzip2

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by chicagotripp (Altoine Barker)

Attachment: Mesa_main.log added

Mesa main.log

Changed 7 years ago by chicagotripp (Altoine Barker)

Attachment: Mesa_config.log added

Mesa config.log

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

The issue in your main log:

395	:info:configure configure: error: Could not find llvm shared libraries:
396	:info:configure         Please make sure you have built llvm with the --enable-shared option
397	:info:configure         and that your llvm libraries are installed in /opt/local/libexec/llvm-4.0/lib
398	:info:configure         If you have installed your llvm libraries to a different directory you
399	:info:configure         can use the --with-llvm-prefix= configure flag to specify this directory.
400	:info:configure         NOTE: Mesa is attempting to use llvm shared libraries by default.
401	:info:configure         If you do not want to build with llvm shared libraries and instead want to
402	:info:configure         use llvm static libraries then add --disable-llvm-shared-libs to your configure
403	:info:configure         invocation and rebuild.

appears to be due to the fact that the llvm libraries are built statically

$ llvm-config   --shared-mode
static

and can be fixed with

configure.args-append --disable-llvm-shared-libs

The other issues building mesa are not necessarily so easy.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:2 Changed 7 years ago by chicagotripp (Altoine Barker)

This is embarrassing. I should have checked for the existence of port lbzip2 before I posted this trouble ticket. The port still fails but with a different error message. It needs to have a dependency for lbzip2. Here is my new error message after installing the port lbzip2:

configure: error: Could not find llvm shared libraries:
	Please make sure you have built llvm with the --enable-shared option
	and that your llvm libraries are installed in /opt/local/libexec/llvm-4.0/lib
	If you have installed your llvm libraries to a different directory you
	can use the --with-llvm-prefix= configure flag to specify this directory.
	NOTE: Mesa is attempting to use llvm shared libraries by default.
	If you do not want to build with llvm shared libraries and instead want to
	use llvm static libraries then add --disable-llvm-shared-libs to your configure
	invocation and rebuild.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6" && ./configure --prefix=/opt/local --disable-dependency-tracking --disable-silent-rules --with-platforms=x11 --disable-egl --disable-gbm --with-gallium-drivers= --enable-osmesa 
Exit code: 1
Error: Failed to configure mesa, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_mesa/mesa/work/mesa-17.1.6/config.log
Error: Failed to configure mesa: configure failure: command execution failed
DEBUG: Error code: NONE
DEBUG: Backtrace: configure failure: command execution failed
    while executing
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_mesa/mesa/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.

Here are the new updated error logs that I will now include as attachments. Yes, that seems to be the only issue left. I'm going to rebuild with your suggested modification to see if that resolves this matter. I'm confident that more than likely will be the case.

Last edited 7 years ago by chicagotripp (Altoine Barker) (previous) (diff)

Changed 7 years ago by chicagotripp (Altoine Barker)

Attachment: Mesa_lbzip2_main.log added

Mesa main.log after installing lbzip2

Changed 7 years ago by chicagotripp (Altoine Barker)

Attachment: Mesa_lbzip2_config.log added

Mesa config.log after installing lbzip2

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

see [54642#comment:1] above.

comment:4 Changed 7 years ago by chicagotripp (Altoine Barker)

I am happy to report after following your suggestion of adding:

configure.args-append --disable-llvm-shared-libs

It build and installed with no problems. I didn't check to see if lbzip2 had to be a runtime dependency or a build dependency but installing that port made the error message concerning not being able to find it go away.

comment:5 Changed 7 years ago by mf2k (Frank Schima)

Cc: chicagotripp jeremyhu removed
Owner: set to jeremyhu
Status: newassigned

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

Resolution: fixed
Status: assignedclosed

In 881750563bc0bb7afecbe5ebb4059dabc5ec0c86/macports-ports:

mesa: Disable configure search for llvm-config

Fixes #54642

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

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

Summary: mesa@17.1.6 Failed to locate 'lbzip2' in pathmesa@17.1.6: error: Could not find llvm shared libraries

The lbzip2 error message is irrelevant; please ignore it. That is a MacPorts base problem that needs to be fixed some other way.

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

In 881750563bc0bb7afecbe5ebb4059dabc5ec0c86/macports-ports:

mesa: Disable configure search for llvm-config

Fixes #54642

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

Note: See TracTickets for help on using tickets.