Update to Freebsd 14, not able to install portupgrade/bd5/cmake-core

When try to update portupgrade got below error

Code:
checking dynamic linker characteristics... freebsd14.0 ld.so
checking how to hardcode library paths into programs... immediate
checking SOSUFFIX from libtool... .so
checking MODSUFFIX from libtool... .so
checking JMODSUFFIX from libtool... .so
checking whether the C++ compiler supports templates for STL... configure: error: no
===>  Script "../dist/configure" failed unexpectedly.
Please report the problem to [email]ports@FreeBSD.org[/email] [maintainer] and attach the
"/usr/ports/databases/db5/work/db-5.3.28/build_unix/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/databases/db5
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/databases/db5
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/databases/ruby-bdb

So I was thinking it could related with cmake, so I tried to reinstall cmake. And then found that cmake-core installation always failed.

Code:
Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
The C++ flags are "-O2 -pipe -I/usr/local/include -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -D__BSD_VISIBLE -isystem /usr/local/include ".
They can be changed using the environment variable CXXFLAGS.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /usr/ports/devel/cmake-core/work/cmake-3.28.3/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
===>  Script "configure" failed unexpectedly.
Please report the problem to [email]kde@FreeBSD.org[/email] [maintainer] and attach the
"/usr/ports/devel/cmake-core/work/cmake-3.28.3/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).


I'm not familiar with compile, could someone please help?

many thanks
 
freebsd-version -kru
Code:
root@r:~ # pkg -v
1.20.9
root@r:~ # pkg prime-origins
devel/autoconf
devel/autoconf-switch
devel/automake
ftp/axel
ports-mgmt/bsdadminscripts2
security/ca_root_nss
ftp/curl
ports-mgmt/dialog4ports
textproc/expat2
print/freetype2
devel/git
devel/gmake
devel/google-perftools
net-mgmt/iftop
archivers/libarchive
devel/libedit
devel/libffi
converters/libiconv
www/libnghttp2
devel/libunwind
textproc/libyaml
databases/mysql80-client
databases/mysql80-server
devel/oniguruma
security/openssl
devel/pcre
devel/pcre2
lang/perl5.34
lang/php74
lang/php74-extensions
databases/pecl-redis
ports-mgmt/pkg
graphics/png
ports-mgmt/portconfig
lang/python
lang/python3
lang/python310
devel/readline
databases/redis
net/rsync
lang/ruby32
devel/ruby-gems
sysutils/screen
security/sshguard
graphics/tiff
databases/xtrabackup8
devel/xxhash
archivers/zstd
root@r5:~ # freebsd-version -kru
14.0-RELEASE-p5
14.0-RELEASE-p3
14.0-RELEASE-p5
 
Code:
root@r5:~ # freebsd-version -kru
14.0-RELEASE-p5
14.0-RELEASE-p3
14.0-RELEASE-p5
Your running kernel is still at p3, you need to reboot.

Code:
lang/perl5.34
Default Perl version is 5.36.

Code:
lang/php74 
lang/php74-extensions
These were removed in November 2022.
Code:
lang/python 
lang/python3 
lang/python310
These don't add up, the default is still 3.9.

What's in /etc/make.conf?
 
Your running kernel is still at p3, you need to reboot.


Default Perl version is 5.36.


These were removed in November 2022.

These don't add up, the default is still 3.9.

What's in /etc/make.conf?
Thanks for your reply.

I think Perl/php/python version shouldn't have any impact on system. I just updated to FreeBSD14, need to update them as well.
But before I fixed cmake-core/bd5 issue, I won't try to update these ports as after I remove the old one I may not able to install the new version.

/etc/make.conf


Code:
OPTIONS_UNSET+= X11 GUI DOCS EXAMPLES NLS DEBUG HELP IPV6 GSSAPI_BASE GSSAPI CUPS APIDOCS BONJOU FONTCONFIG
DEFAULT_VERSIONS+=ssl=openssl

OPTIONS_UNSET+= GSSAPI_BASE
OPTIONS_SET+=   GSSAPI_MIT

WITHOUT_MODULES = sound ntfs linux
WITH_X=NO
WITH_CPUFLAGS=YES
WITH_OPTIMIZED_CFLAGS=YES
WITHOUT_DEBUG=YES

BUILD_OPTIMIZED=YES
BUILD_STATIC=YES
ENABLE_GUI=NO
NO_INET6=YES
DEFAULT_VERSIONS+=perl5=5.34
DEFAULT_VERSIONS+=python=3.10
DEFAULT_VERSIONS+=python3=3.10
DEFAULT_VERSIONS+=ruby=3.2

ALLOW_UNSUPPORTED_SYSTEM=ye
 
What is the primary role of this server? I see you have MySQL and Percona. Do you use it as web server also? If yes which web server you are using i don't see apache2/nginx or other.
 
What is the primary role of this server? I see you have MySQL and Percona. Do you use it as web server also? If yes which web server you are using i don't see apache2/nginx or other.
yes, it's web server. I tried to upgrade nginx, but due to cmake issue, I'm not able to install the new version.
 
Here's my proposal:

First check if your web site have support for PHP8.2 as this is the default PHP version. Then write down all current PHP extensions using pkg ver | grep php
Then uninstall all pkgs and empty your /etc/make.conf and put only this
DEFAULT_VERSIONS+= ruby=3.1 BDB=18
#note ruby3.2 have issue with portupgrade PR 277395 when it's resolved you can switch to ruby3.2

After that install again pkg

pkg bootstrap -f


Update the /usr/ports/ using git and if previously updated via portsnap you need first to delete /usr/ports and fetch it again

pkg install git-tiny
rm -drf /usr/ports/*
rm -r /usr/ports/.*
git clone https://git.freebsd.org/ports.git /usr/ports

Then install again your ports and use PHP82-extensions to select required PHP extensions for your web site.
 
Here's my proposal:

First check if your web site have support for PHP8.2 as this is the default PHP version. Then write down all current PHP extensions using pkg ver | grep php
Then uninstall all pkgs and empty your /etc/make.conf and put only this

#note ruby3.2 have issue with portupgrade PR 277395 when it's resolved you can switch to ruby3.2

After that install again pkg

pkg bootstrap -f


Update the /usr/ports/ using git and if previously updated via portsnap you need first to delete /usr/ports and fetch it again



Then install again your ports and use PHP82-extensions to select required PHP extensions for your web site.

Still the same error. I think the issue is not related with php or any other packages.

I tried to remove everything in make.conf and only leave ruby as you suggested, but when try to install cmake-core, got the same error.

Code:
CMake 3.28.3, Copyright 2000-2023 Kitware, Inc. and Contributors
Warning: This is an in-source build
C compiler on this system is: cc -O2 -pipe  -I/usr/local/include -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   
---------------------------------------------
Error when bootstrapping CMake:
Cannot find a C++ compiler that supports both C++11 and the specified C++ flags.
Please specify one using environment variable CXX.
The C++ flags are "-O2 -pipe -I/usr/local/include -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -D__BSD_VISIBLE -isystem /usr/local/include ".
They can be changed using the environment variable CXXFLAGS.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /usr/ports/devel/cmake-core/work/cmake-3.28.3/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
===>  Script "configure" failed unexpectedly.
Please report the problem to kde@FreeBSD.org [maintainer] and attach the
"/usr/ports/devel/cmake-core/work/cmake-3.28.3/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).

Then I tried to install llvm15, and I got below error

Code:
checking whether c++ accepts -g... yes
checking C++ compiler c++  -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  ... no, std iostream
configure: error: C++ compiler not available, see config.log for details
===>  Script "configure" failed unexpectedly.

But c++ is there

Code:
# c++ --version
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
 
You can restore the backup of the server to a test virtual machine and test the update there.
I thought about that. But server has lots of data (>10T)..
The last choice is that I build a brand new Freebsd 14 server and transfer data there, and then rebuilt the problem server..
 
Update:

I installed FreeBSD on another server and copied /usr/include/c++ folder from new server to old system, and then C++ compiler starts working!
 
Back
Top