Solved Ports no compile after upgrading system

freethread

Well-Known Member

Reaction score: 32
Messages: 361

Hi to all.
I left my server three years ago with the 10.3-RELEASE version. I thought I'd upgrade it to version 12.1-RELEASE by going from version 11.3-RELEASE:
Code:
10.3-RELEASE -> 11.3-RELEASE -> 12.1-RELEASE
Today I proceeded with the first step using the command
Code:
freebsd-update -r 11.3-RELEASE
went well until the ports update
Code:
portmaster -af
When ports compilation begins, a clang compiler error is generated, this is an extract from portmaster log
Code:
...
Extracting Policy.sh (with variable substitutions)
Extracting runtests (with variable substitutions)
Run make depend now? [y]
/usr/sbin/dtrace -xnolibs -h -s perldtrace.d -o perldtrace.h.in
sed -e '/const/!s/char \*/const char */g' perldtrace.h.in >perldtrace.h
rm -f perldtrace.h.in
cc -c -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall generate_uudmap.c
cc: error: unable to execute command: Bus error (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 8.0.0 (tags/RELEASE_800/final 356365) (based on LLVM 8.0.0)
Target: x86_64-unknown-freebsd11.3
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
cc: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/generate_uudmap-dfdbe5.c
cc: note: diagnostic msg: /tmp/generate_uudmap-dfdbe5.sh
cc: note: diagnostic msg:
********************
*** Error code 254
Stop.
make[2]: stopped in /usr/ports/lang/perl5.30/work/perl-5.30.0
If you compile perl5 on a different machine or from a different object
directory, copy the Policy.sh file from this object directory to the
...
Any port I compile it gave me the error
Code:
Bus error
I don't know what to do
Actually uname -a get me this
Code:
FreeBSD master.void.lan 11.3-RELEASE-p3 FreeBSD 11.3-RELEASE-p3 #0: Mon Aug 19 21:08:43 UTC 2019
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
I had and have a GENERIC kernel
Thanks for help
 

rigoletto@

Daemon
Developer

Reaction score: 1,171
Messages: 2,217

In short you need to rebuild everything and ports-mgmt/portmaster is far from the the best tool for that. I do recommend you to use ports-mgmt/synth or ports-mgmt/poudriere to build your ports.

In both cases you should also reinstall all packages. I think the best way to do that is creating a list of the your origins:

pkg prime-origins | sort | tee pkglist -- better be logged as root and save it on /root
(edit the file to remove/add anything you feel should be removed/added)

Then use this file with the orgins list to build everything needed, and how to do that depends of what you will use.

After you have all necessary ports built and the repository created by Synth or Poudriere, and having pkg(8) configured to use that repository:

pkg del -af && pkg ins `cat pkglist`
 
OP
freethread

freethread

Well-Known Member

Reaction score: 32
Messages: 361

thank you rigoletto@ I solved the problem in I-don't-know way. Initially I followed your suggestion, get the list of primary ports in a file and then remove all packages and reinstall all packages (whith pkg) in the list. It worked for a while then pkg stopped with an error at some point. I don't remember the exact point and the error, I decided to run the final command
Code:
freebsd-update install
at this point I had the 11.3-RELEASE installed with messed ports.

I decided to get the 12.1-RELEASE, I made the steps as in handbook:
Code:
freebsd-update -r 12.1-RELEASE upgrade
freebsd-update install
shutdown -r now
freebsd-update-install
at this point removed all packages installed with command
Code:
pkg del -af
then removed all content in /usr/ports and in /var/db/pkg, recreated the ports tree with command
Code:
portsnap fetch extract
and reinstalled pkg and portmaster in this way:
Code:
cd /usr/ports/ports-mgmt/pkg
make install clean
cd ../portmaster
make install clean
run the last step of upgrading
Code:
freebsd-update install
At this point installed all the ports with portmaster (still in progress).
 
Top