Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph-tool: update version to 2.68 #24153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

count0
Copy link
Contributor

@count0 count0 commented May 26, 2024

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS x.y
Xcode x.y / Command Line Tools x.y.z

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL in commit message?
  • checked your Portfile with port lint --nitpick?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@essandess for port py-graph-tool.

@essandess
Copy link
Contributor

Thank you Tiago. FWIW, I tried to update a while ago and ran into some build issue, and see there’s a CI error; I had attributed the issue I saw to upstream (you) builds on macOS but haven’t had the cycles to post an issue. I’m not going to be able to even download the error logs for at least a week, so perhaps someone here can help you with the CI error. I’ll drop back in as soon as I can.

@count0
Copy link
Contributor Author

count0 commented May 27, 2024

@essandess graph-tool has been building fine on MacOS under homebrew, so it must be some easily solvable issue.

@count0
Copy link
Contributor Author

count0 commented May 27, 2024

@essandess Looking at the logs, its seems like the build is failing because of a mismatch between boost python and the python version being used.

@pmetzger
Copy link
Member

pmetzger commented Jun 2, 2024

@count0 Do you plan to work on fixing the update?

@count0
Copy link
Contributor Author

count0 commented Jun 2, 2024

@pmetzger Sorry, but this is outside of what I can do at the moment. This is not an upstream issue at all; as far as I can tell is just a problem with the port and its requirements.

@essandess
Copy link
Contributor

@pmetzger Sorry, but this is outside of what I can do at the moment. This is not an upstream issue at all; as far as I can tell is just a problem with the port and its requirements.

First, @count0 is correct: It appears that the CI installs boost using a default +python312 variant, which will cause an error for all non py312-graph-tool versions of this port (error below). Because Macports doesn't provide a way to require variants, this causes a CI errors for non-default Python versions. This is fundamentally a boost/Macports issue, not an upstream issue.

AFAIK, there doesn't appear to be a way to avoid CI errors with the way that the boost port is written.

cc: @michaelld, @mascguy

Second, @count0: I am unable to compile the latest version of graph-tool even when I have boost installed using the correct version of Python. I'm hitting this configuration issue with cgal: configure: error: CGAL library not found. I confirm that I have cgal 5.6.1.0 installed and its files are all in the places you'd expect: ${prefix}/include/CGAL, ${prefix}/lib/cmake/CGAL, and so forth. Would you please help me get a working graph-tool build so that I can modify the Portfile accordingly, or make recommendations for you to modify it?

main.log

:info:configure checking whether CGAL is available in /opt/local/include... checking whether CGAL is available in /opt/local/include... no
:info:configure configure: error: CGAL library not found.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68" && ./configure --prefix=/opt/local --exec-prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.12 --with-boost=/opt/local/libexec/boost/1.81 --with-cgal=/opt/local/include --with-expat=yes --with-expat-inc=/opt/local/include --with-expat-lib="-L/opt/local/lib -lexpat" --enable-openmp
:info:configure Exit code: 1 
:error:configure Failed to configure py312-graph-tool: consult /opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68/config.log
:error:configure Failed to configure py312-graph-tool: configure failure: command execution failed

Existing error:

2024-05-26T23:04:47.2248180Z DEBUG: boost181 is installed with the following variants: +no_single+no_static+python312
2024-05-26T23:04:47.2248280Z DEBUG:   required: python311, forbidden: 
2024-05-26T23:04:47.2248550Z DEBUG:   rejected, because required variant python311 is missing
2024-05-26T23:04:47.2249460Z Error: Failed to configure py311-graph-tool: boost181 must be installed with +python311.
2024-05-26T23:04:47.2249540Z DEBUG: Error code: NONE
2024-05-26T23:04:47.2249690Z DEBUG: Backtrace: boost181 must be installed with +python311.
2024-05-26T23:04:47.2249760Z     while executing

@essandess
Copy link
Contributor

@count0: Here's the configure error from conf.log:

configure:22659: checking whether CGAL is available in /opt/local
configure:22696: /opt/local/bin/clang++-mp-18 -o conftest -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -pipe -I/opt/local/libexec/boost/1.81/include -Os -Wno-delete-non-abstract-non-virtual-dtor -Wno-deprecated-copy -Wno-deprecated-copy-with-user-provided-copy -Wno-missing-field-initializers -Wno-parentheses -Wno-unused-parameter -Wno-error=unknown-warning-option -Wno-unknown-warning-option -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64 -DBOOST_ALLOW_DEPRECATED_HEADERS -DNDEBUG -I/opt/local/libexec/boost/1.81/include -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/.. -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/opt/local/include -pthread -I/opt/local/libexec/boost/1.81/include -L/opt/local/libexec/boost/1.81/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64 -L/opt/local/libexec/boost/1.81/lib  conftest.cpp -lgmp -lgmp  >&5
ld: warning: ignoring duplicate libraries: '-lgmp'
ld: warning: reexported library with install name '/opt/local/lib/libunwind.1.dylib' found at '/opt/local/lib/libunwind.1.dylib' couldn't be matched with any parent library and will be linked directly
configure:22696: $? = 0
configure:22696: ./conftest
dyld[94431]: Library not loaded: @rpath/libc++.1.dylib
  Referenced from: <D596066B-741C-3124-A621-EF3310B86214> /opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68/conftest
  Reason: no LC_RPATH's found
./configure: line 2058: 94431 Abort trap: 6           ./conftest$ac_exeext
configure:22696: $? = 134
configure: program exited with status 134

@count0
Copy link
Contributor Author

count0 commented Jun 4, 2024

Strange error, I haven't seen it before... The test is segfaulting; most likely due to some build time library/compiler inconsistency.

Can you isolate the specific C++ test code from config.log and post it here and try to compile it by hand, so we know better what we are looking at?

@essandess
Copy link
Contributor

I can compile contest.cpp from the failure reported in conf.log and replicate the error. The linker has @rpath/libc++.1.dylib. I think there's a load path to llvm that needs to be appended to catch these library locations in, say, /opt/local/libexec/llvm-17/lib/libc++.1.dylib. Not sure why that's not being done automatically.

/opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68/conftest
dyld[3040]: Library not loaded: @rpath/libc++.1.dylib
  Referenced from: <D596066B-741C-3124-A621-EF3310B86214> /opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68/conftest
  Reason: no LC_RPATH's found
Abort trap: 6
otool -L /opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68/conftest
/opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68/conftest:
	/opt/local/lib/libgmp.10.dylib (compatibility version 16.0.0, current version 16.0.0)
	/opt/local/lib/libomp/libomp.dylib (compatibility version 5.0.0, current version 5.0.0)
	@rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
	/opt/local/lib/libunwind.1.dylib (compatibility version 1.0.0, current version 5.0.1)
sudo bash -c 'cd /opt/local/var/macports/build/_opt_local_ports_python_py-graph-tool/py312-graph-tool/work/graph-tool-2.68 ; /opt/local/bin/clang++-mp-18 -o conftest -fopenmp -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-deprecated -Wall -Wextra -ftemplate-backtrace-limit=0 -pipe -I/opt/local/libexec/boost/1.81/include -Os -Wno-delete-non-abstract-non-virtual-dtor -Wno-deprecated-copy -Wno-deprecated-copy-with-user-provided-copy -Wno-missing-field-initializers -Wno-parentheses -Wno-unused-parameter -Wno-error=unknown-warning-option -Wno-unknown-warning-option -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64 -DBOOST_ALLOW_DEPRECATED_HEADERS -DNDEBUG -I/opt/local/libexec/boost/1.81/include -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12/.. -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/opt/local/include -pthread -I/opt/local/libexec/boost/1.81/include -L/opt/local/libexec/boost/1.81/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch x86_64 -L/opt/local/libexec/boost/1.81/lib  conftest.cpp -lgmp -lgmp'

conftest.cpp:
conftest.cpp.gz

@essandess
Copy link
Contributor

@mascguy, @reneeotten, @pmetzger, @count0

Do any of you have insight on this configure compilation test error? There's an executable being created with @rpath/libc++.1.dylib, and the only place I see this library is in the llmv ports /opt/local/libexec/llvm-*/lib/libc++.1.dylib. Yet this port doesn't use llvm. Should it? Or is the linker's inclusion of @rpath/libc++.1.dylib erroneous?

@mohd-akram
Copy link
Member

@kencu
Copy link
Contributor

kencu commented Jun 5, 2024

yes indeed, another example of the wrong libc++.dylib being found (the one in the llvm libs folder instead of the one in the system).

The cleanest, most robust fix is probably to change the clang port to move the installation location of the libc++.dylib install to a subfolder of the llvm libs folder, as was done here

Homebrew/homebrew-core#96915

Homebrew/homebrew-core@9b9e79a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants