Bug 275165 - science/dirac: Fails to build with GCC 13: Check for working CXX compiler: /usr/bin/c++ - broken
Summary: science/dirac: Fails to build with GCC 13: Check for working CXX compiler: /u...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks: 273397
  Show dependency treegraph
 
Reported: 2023-11-18 10:41 UTC by Lorenzo Salvadore
Modified: 2023-11-19 09:37 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2023-11-18 10:41:00 UTC
This bug report blocks the update of GCC_DEFAULT to 13. This webpage can help finding a fix: https://gcc.gnu.org/gcc-13/porting_to.html

-- Check for working CXX compiler: /usr/bin/c++ - broken
CMake Error at /usr/local/share/cmake/Modules/CMakeTestCXXCompiler.cmake:60 (message):
  The C++ compiler

    "/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /wrkdirs/usr/ports/science/dirac/work/.build/external/xcfun-build/CMakeFiles/CMakeScratch/TryCompile-MtpnWU
    
    Run Build Command(s):/usr/local/bin/cmake -E env VERBOSE=1 /usr/local/bin/gmake -f Makefile cmTC_5af96/fast && gmake[4]: Entering directory '/wrkdirs/usr/ports/science/dirac/work/.build/external/xcfun-build/CMakeFiles/CMakeScratch/TryCompile-MtpnWU'
    /usr/local/bin/gmake  -f CMakeFiles/cmTC_5af96.dir/build.make CMakeFiles/cmTC_5af96.dir/build
    gmake[5]: Entering directory '/wrkdirs/usr/ports/science/dirac/work/.build/external/xcfun-build/CMakeFiles/CMakeScratch/TryCompile-MtpnWU'
    Building CXX object CMakeFiles/cmTC_5af96.dir/testCXXCompiler.cxx.o
--- src/gp/CMakeFiles/git_info.dir/all ---
cd /wrkdirs/usr/ports/science/dirac/work/DIRAC-22.0-Source/src/gp && /usr/local/bin/cmake -D INPUT_DIR=/wrkdirs/usr/ports/science/dirac/work/DIRAC-22.0-Source/cmake/downloaded -D OUTPUT_DIR=/wrkdirs/usr/ports/science/dirac/work/.build -P /wrkdirs/usr/ports/science/dirac/work/DIRAC-22.0-Source/cmake/downloaded/git-hash.cmake
--- src/CMakeFiles/xcfun.dir/all ---
    /usr/bin/c++   -O2 -pipe -DSYS_LINUX -fstack-protector-strong -fno-strict-aliasing  -DSYS_LINUX -g -Wall -Wno-unknown-pragmas -Wno-sign-compare -Woverloaded-virtual -Wwrite-strings -Wno-unused  -MD -MT CMakeFiles/cmTC_5af96.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_5af96.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_5af96.dir/testCXXCompiler.cxx.o -c /wrkdirs/usr/ports/science/dirac/work/.build/external/xcfun-build/CMakeFiles/CMakeScratch/TryCompile-MtpnWU/testCXXCompiler.cxx
    Linking CXX executable cmTC_5af96
    /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5af96.dir/link.txt --verbose=1
    /usr/bin/c++ -O2 -pipe -DSYS_LINUX -fstack-protector-strong -fno-strict-aliasing  -DSYS_LINUX -g -Wall -Wno-unknown-pragmas -Wno-sign-compare -Woverloaded-virtual -Wwrite-strings -Wno-unused  -llapack -lblas -Wl,-rpath=/usr/local/lib/gcc13  -L/usr/local/lib/gcc13 -fstack-protector-strong  CMakeFiles/cmTC_5af96.dir/testCXXCompiler.cxx.o -o cmTC_5af96 
    ld: error: unable to find library -llapack
    ld: error: unable to find library -lblas
    c++: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[5]: *** [CMakeFiles/cmTC_5af96.dir/build.make:100: cmTC_5af96] Error 1
    gmake[5]: Leaving directory '/wrkdirs/usr/ports/science/dirac/work/.build/external/xcfun-build/CMakeFiles/CMakeScratch/TryCompile-MtpnWU'
    gmake[4]: *** [Makefile:127: cmTC_5af96/fast] Error 2
    gmake[4]: Leaving directory '/wrkdirs/usr/ports/science/dirac/work/.build/external/xcfun-build/CMakeFiles/CMakeScratch/TryCompile-MtpnWU'

Full log: https://pkg-status.freebsd.org/package22/data/132amd64-default-foo/2023-11-10_07h48m13s/logs/errors/dirac-quantum-chemistry-software-22.0_1.log

I wonder however if this bug really has something to do with GCC 13, since it complains with /usr/bin/c++.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2023-11-19 09:36:27 UTC
Problem fixed.

Thanks for reporting it!
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-11-19 09:37:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c3bbf2cf15284e03e6804750f83d9b659b1afb93

commit c3bbf2cf15284e03e6804750f83d9b659b1afb93
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-11-19 08:39:04 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-11-19 09:36:25 +0000

    science/dirac: Fix build by adding USES=localbase:ldflags

    Otherwise liblapack wasn't found.

    PR:             275165
    Reported by:    Lorenzo Salvadore <salvadore@freebsd.org>; fallout

 science/dirac/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)