Page MenuHomeFreeBSD

Update CMake to 3.11.0
ClosedPublic

Authored by adridg on Feb 25 2018, 9:16 PM.

Details

Summary

Updates to latest release. This makes some of our patches
unnecessary, since they have gone upstream. Apply some new
hacks to get it to build BLAS and OpenMP.

Test Plan
  • It builds on amd64 11.1, i386 10.3
  • Needs testing on aarch64

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

adridg created this revision.Feb 25 2018, 9:16 PM

I think I had some threading issues here when trying to build CMake from git a while ago too. Do you have the exact error message at hand so we could investigate? A quick build of 3.11.0-rc1 on Fedora shows me something like this:

[ 90%] Linking CXX executable ../bin/cmake
/usr/bin/ld: libCMakeLib.a(cmQtAutoGeneratorMocUic.cxx.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line

but everything works fine with master.

devel/cmake/Makefile
22 ↗(On Diff #39718)

USES=libarchive was added by bapt in r392537. Was there a specific reason to remove it? Does not removing it fix the threading issues you mentioned?

[ 90%] Linking CXX executable ../bin/cmake
/usr/bin/ld: libCMakeLib.a(cmQtAutoGeneratorMocUic.cxx.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
[ 87%] Linking CXX executable ../bin/cmake
/usr/bin/ld: undefined reference to symbol `pthread_create@@FBSD_1.0' (try adding -lthr)
//lib/libthr.so.3: could not read symbols: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)

but everything works fine with master.

It's not about the code, though: the port builds with configure --system-libs, but usually when you build by hand you just run configure. And whatever it's doing then (finding some of the libraries in the system) is getting -pthread into the linker flags, which does the trick as well.

adridg added inline comments.Feb 26 2018, 6:33 PM
devel/cmake/Makefile
22 ↗(On Diff #39718)

USES adds a dependency on ports libarchive, while libpkg depends in base libarchive, and I was getting linker warnings that libarchive.so.13 might conflict with libarchive.so.6. I don't think this has anything to do with the threading issues -- I have ports libarchive installed and it is found and used if I don't enable the pkg generator in CPack but the threading issue persists.

mat added inline comments.Feb 27 2018, 3:43 PM
devel/cmake-doc/pkg-plist
1 ↗(On Diff #39718)

empty line.

tcberner added inline comments.Mar 4 2018, 8:03 AM
devel/cmake-doc/pkg-plist
3 ↗(On Diff #39718)

^ this should not be %%CMAKE_BUILD_TYPE%% but explictely release

adridg updated this revision to Diff 40594.Mar 22 2018, 11:04 AM

Update to -rc4

adridg updated this revision to Diff 41262.Apr 8 2018, 12:45 PM

Update to 3.11.0 final, fix FindBLAS and FindOpenMP; 0 new fallout
failures on a local 11.1 build.

adridg retitled this revision from Update CMake to 3.11.0-rc1 to Update CMake to 3.11.0.Apr 8 2018, 12:59 PM
adridg edited the summary of this revision. (Show Details)
adridg updated this revision to Diff 41263.Apr 8 2018, 1:10 PM

Fix up plist for cmake-doc

adridg marked 4 inline comments as done.Apr 8 2018, 1:24 PM

Marked stuff as done (plist-issues, and about libarchive).

This revision was not accepted when it landed; it landed in state Needs Review.Apr 15 2018, 9:44 PM
This revision was automatically updated to reflect the committed changes.