Solved problem install binutils

Please help to solve the problem.
I am trying to install binutils through the ports, but there is a problem, how to fix it, any tips?
Code:
c++ -W -Wall    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=incremental-dump  -I/usr/local/includ
e -pthread  -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -Wno-c++11-na
rrowing -isystem /usr/local/include      -pthread -Wl,--undefined-version -fstack-protector-strong  -o increme
ntal-dump incremental-dump.o i386.o x86_64.o sparc.o powerpc.o arm.o arm-reloc-property.o tilegx.o mips.o aarc
h64.o aarch64-reloc-property.o s390.o libgold.a ../libiberty/libiberty.a /usr/local/lib/libintl.so -Wl,-rpath 
-Wl,/usr/local/lib   -lz -L/usr/local/lib -lzstd  -L/usr/local/lib
gmake[4]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40/gold'
gmake[3]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40/gold'
gmake[2]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40/gold'
gmake[1]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40'
gmake: *** [Makefile:1004: all] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/devel/binutils
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/binutils

===>>> make build failed for devel/binutils
===>>> Aborting update

Try to set MAKE_JOBS_UNSAFE=yes
the advice was also unsuccessful, the error was the same.
 
Last edited by a moderator:
How? What actual commands did you type?
in /usr/ports/devel/binutils
make install clean
got
gmake[1]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40'gmake: *** [Makefile:1004: all]
Error 2===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure tothe maintainer.*** Error code 1
then followed the recommendation
in /usr/ports/devel/binutils
make clean
make reinstall clean MAKE_JOBS_UNSAFE=yes
received again
gmake[1]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40'gmake: *** [Makefile:1004: all] Error 2===> Compilation failed unexpectedly.
 
1714077485079.png
 
You this meant it?
/bin/sh ./libtool --tag=CC --mode=link cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -I/us
r/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wl
,--undefined-version -fstack-protector-strong -o readelf readelf.o version.o unwind-ia64.o dwarf.o demanguse.
o elfcomm.o ../libctf/libctf-nobfd.la /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib ../libiberty/lib
iberty.a -lz -L/usr/local/lib -lzstd -Llib -lmsgpack-c ../libsframe/libsframe.la -L/usr/local/lib
cd: lib: No such file or directory
libtool: link: cannot determine absolute directory name of `lib'

gmake[4]: *** [Makefile:1055: readelf] Error 1
 
root@gw144:/usr/home/andrian # uname -a
FreeBSD gw144 13.3-RELEASE-p1 FreeBSD 13.3-RELEASE-p1 Core amd64
at first i used
root@gw144:/usr/ports #portsnap fetch && portsnap update
after that I tried to install the port, I did not succeed as I wrote above.
then I deleted everything in the
/usr/ports/*
and
root@gw144:/usr/ports #git clone https://git.freebsd.org/ports.git /usr/ports
root@gw144:/usr/ports #portsnap fetch && portsnap update
tried install the port again binutils - problem.
 
Works fine here on the same version of FreeBSD and platform:
Code:
root@vp2410:/home/xyz # portsnap fetch update
...
root@vp2410:/home/xyz # cd /usr/ports/devel/binutils/
root@vp2410:/usr/ports/devel/binutils # freebsd-version -ruk
13.3-RELEASE-p1
13.3-RELEASE-p1
13.3-RELEASE-p2
root@vp2410:/usr/ports/devel/binutils # make

unticked all options
pulls in gmp, unticked all options
pulls in mpfr, unticked all options
chugs away and ends with:
Code:
gmake[3]: Nothing to be done for 'all'.
gmake[3]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40/libiberty/testsuite'
if test -n ""; then \
    /bin/sh ./../mkinstalldirs /usr/ports/devel/binutils/work-native/stage/usr/local/lib/`cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing      -print-multi-os-directory`; \
    install  -m 0644 ./libiberty.a /usr/ports/devel/binutils/work-native/stage/usr/local/lib/`cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing      -print-multi-os-directory`/./libiberty.an; \
    ( cd /usr/ports/devel/binutils/work-native/stage/usr/local/lib/`cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing      -print-multi-os-directory` ; chmod 644 ./libiberty.an ;ranlib  ./libiberty.an ); \
    mv -f /usr/ports/devel/binutils/work-native/stage/usr/local/lib/`cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing      -print-multi-os-directory`/./libiberty.an /usr/ports/devel/binutils/work-native/stage/usr/local/lib/`cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing      -print-multi-os-directory`/./libiberty.a; \
    case "" in \
      /*)    thd=;; \
      *)     thd=/usr/local/include/;; \
    esac; \
    /bin/sh ./../mkinstalldirs /usr/ports/devel/binutils/work-native/stage${thd}; \
    for h in ./../include/ansidecl.h ./../include/demangle.h ./../include/dyn-string.h ./../include/fibheap.h ./../include/floatformat.h ./../include/hashtab.h ./../include/libiberty.h ./../include/objalloc.h ./../include/partition.h ./../include/safe-ctype.h ./../include/sort.h ./../include/splay-tree.h ./../include/timeval-utils.h; do \
      install  -m 0644 $h /usr/ports/devel/binutils/work-native/stage${thd}; \
    done; \
fi
gmake[3]: Entering directory '/usr/ports/devel/binutils/work-native/binutils-2.40/libiberty/testsuite'
gmake[3]: Nothing to be done for 'install'.
gmake[3]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40/libiberty/testsuite'
gmake[2]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40/libiberty'
gmake[1]: Nothing to be done for 'install-target'.
gmake[1]: Leaving directory '/usr/ports/devel/binutils/work-native/binutils-2.40'
install  -m 0644 /usr/ports/devel/binutils/work-native/binutils-2.40/include/plugin-api.h /usr/ports/devel/binutils/work-native/stage/usr/local/include/
====> Compressing man pages (compress-man)
root@vp2410:/usr/ports/devel/binutils #

So something different that you are doing or have done on your 13.3 system.

Anything in /etc/make.conf? Different options chosen in the make config step?
 
root@gw144:/usr/ports # cat /etc/make.conf
OPTIONS_UNSET=X11
DEFAULT_VERSIONS+=ssl=openssl
#-quictls
#DEFAULT_VERSIONS+=php=82
#DISABLE_VULNERABILITIES=yes
#DEFAULT_VERSIONS+=perl5=5.36
#DISABLE_VULNERABILITIES=yes
#MAKE_JOBS_UNSAFE=yes
 
Different options chosen in the make config step?
No, I just did a reset config before installing.
make rmconfig && make reinstall clean
 
I'm trying to help but you are not answering questions.

Did *you* choose any options when you built any of this?

I did make and unticked ALL options for binutils, gmp, and mpfr. It works. What happens if you try that?

This is *your* system and *you* may have done something to it so you need to figure out what that is and fix it.

The basic build-from-port works fine and I don't know what you might have done on your system or what choices you've made that might affect that.
 
I did make and unticked ALL options for binutils, gmp, and mpfr. It works. What happens if you try that?
Well, I will do it and write you back.
 
I tried

Code:
cd /usr/ports/devel/binutils
make clean
make config

Ticked the RELRO option (just to see if this option triggers the same output as you are getting), then did make and no problems building binutils. I'm not doing the install step but this seems to be compliation issues rather than at the install stage.

When I look my build output, and I don't see any msgpack in it (it shows in your build output), so I'll try again, this time with NLS ticked. Worked fine.

I just don't get that "No such file or directory" error that shows - can you figure out what directory it is talking about?

Ticking the INFO option - the last one left and trying another rebuild, so from no options ticked to all options ticked.

EDIT: ticking the INFO option worked too.
 
Thank you for helping.
So, I build with all unticked options
cd /usr/ports/devel/binutils
make
and get errors.
I try with only the "info" option - also an error.
I noticed that the same error appears when I try these:

/bin/sh ./libtool --tag=CC --mode=link cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -I/usr/local/include -O2
-pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -Wl,--undefined-version -fstack-protector
-strong -o readelf readelf.o version.o unwind-ia64.o dwarf.o demanguse.o elfcomm.o ../libctf/libctf-nobfd.la ../libiberty/libib
erty.a -lz -L/usr/local/lib -lzstd -Llib -lmsgpack-c ../libsframe/libsframe.la -L/usr/local/lib
cd: lib: No such file or directory
libtool: link: cannot determine absolute directory name of `lib'


now I will try to reassemble:
msgpack-c and libtool
I will write about the result.
 
Something is broken on your system - you need to figure out what directory it is complaining about and work backwards from that.

The output you have pasted does not match what I see when I try to make binutils so I think you are doing something different.

If you have another machine or VM try a fresh 13.3 install on there with default options and try and build binutils. It should work on there and then you can compare the two systems to see what’s different.
 
I get the exact same error as you, andrian. Have you come across a solution or any new ideas? I do see that libtool error reported in other builds/systems but just started investigating. I'm running a fresh install of FreeBSD 14.
 
I get the exact same error as you, andrian. Have you come across a solution or any new ideas? I do see that libtool error reported in other builds/systems but just started investigating. I'm running a fresh install of FreeBSD 14.
Hello, the problem is still not solved, I wasted a lot of time!
I am currently trying to solve this problem on the 13.3 release, but without success.
Therefore, now I will try the following option: update the system from sources
# mv /usr/src /usr/src.bak
# git clone --branch releng/13.3 https://git.freebsd.org/src.git /usr/src
#git -C /usr/src pull
# cd /usr/src
# make -j4 buildworld buildkernel
# make installkernel
# shutdown -r now
# cd /usr/src
# make installworld
# shutdown -r now
# cd /etc
# etcupdate diff
# cd /usr/src
# make check-old
# make delete-old
# make check-old-libs
# make delete-old-libs
# shutdown -r now
Here on the forum I read a post that such problems arise if there are discrepancies in the installation of packages through the pkg and through the assembly from the ports, then reassemble all the ports with the help of portmaster (man):
1. portmaster --list-origins > ~/installed-port-list
2. Update the ports tree
3. portmaster -ty --clean-distfiles
4. portmaster -Faf
5. pkg delete -afy
6. rm -rf /usr/local/lib/compat/pkg
7. Back up any files in /usr/local you wish to save,
such as configuration files in /usr/local/etc
8. Manually check /usr/local and /var/db/pkg
to make sure that they are really empty
9. Install ports-mgmt/pkg and then ports-mgmt/portmaster.
Remove both from ~/installed-port-list.
10. portmaster --no-confirm `cat ~/installed-port-list`
now I'm reinstalling the ports and waiting for the result.
 
Thanks for all the details! That's handy even in the case of other situations. Let us know how it turns out.

As for me, I gave up rather quick. I ended up installing binutils using pkg (with the repos set to latest). I also put pkg lock on it. It's my only pkg install. Seems to be working fine, now lets see if the rest of firefox will compile.
 
Back
Top