configure: error: C compiler cannot create executables ERROR on FreeBSD 14.0-RELEASE

Hello.

I'm not able to install sudo on my FreeBSD 14.0-RELEASE-p3 amd64

Code:
marietto:/usr/ports/security/sudo # make

===>  License sudo accepted by the user
===>   sudo-1.9.15p4 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by sudo-1.9.15p4 for building
===>  Extracting for sudo-1.9.15p4
=> SHA256 Checksum OK for sudo-1.9.15p4.tar.gz.
===>  Patching for sudo-1.9.15p4
===>  Applying FreeBSD patches for sudo-1.9.15p4 from
/usr/ports/security/sudo/files
===>   sudo-1.9.15p4 depends on package: pkgconf>=1.3.0_1 - found
===>   sudo-1.9.15p4 depends on package: gettext-runtime>=0.22_1 - found
===>   sudo-1.9.15p4 depends on executable: msgfmt - found
===>   sudo-1.9.15p4 depends on file: /usr/local/lib/libcrypto.so.12 - found
===>   sudo-1.9.15p4 depends on shared library: libintl.so - found
(/usr/local/lib/libintl.so)
===>  Configuring for sudo-1.9.15p4
configure: loading site script /usr/ports/Templates/config.site
checking for gcc... cc
checking whether the C compiler works... no
configure: error: in '/usr/ports/security/sudo/work/sudo-1.9.15p4':
configure: error: C compiler cannot create executables
See 'config.log' for more details
===>  Script "configure" failed unexpectedly.

Please report the problem to garga@FreeBSD.org [maintainer] and attach the
"/usr/ports/security/sudo/work/sudo-1.9.15p4/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[1]: stopped in /usr/ports/security/sudo
*** Error code 1

Stop.
make: stopped in /usr/ports/security/sudo

More informations are located here :

/usr/local/sbin/pkg-static info -g -Ea =

https://pastebin.ubuntu.com/p/3fCY3hFRCG/

/usr/ports/security/sudo/work/sudo-1.9.15p4/config.log =

https://pastebin.ubuntu.com/p/PK2QxNHwkk/

I suspect some misconfiguration on the gcc / cc / clang compiler. I expect that sudo won't be installed telling that it has been already installed from packages,but the error is different.
 
Hmm:

configure: error: C compiler cannot create executables

Seems to fail one of its few "simple" tasks doesn't it ;)

The config.log file is a little noisy but this section raises some red flags:

configure:4233: $? = 0
configure:4222: cc -V >&5
cc: error: argument to '-V' is missing (expected 1 value)
cc: error: no input files
configure:4233: $? = 1
configure:4222: cc -qversion >&5
cc: error: unknown argument '-qversion'; did you mean '--version'?
cc: error: no input files
configure:4233: $? = 1
configure:4222: cc -version >&5
cc: error: unknown argument '-version'; did you mean '--version'?
cc: error: no input files
configure:4233: $? = 1
configure:4253: checking whether the C compiler works
configure:4275: cc -O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing -lgcc -L/usr/local/lib -lintl -Wl,-rpath,/usr/local/lib -fstack-protector-strong conftest.c >&5
ld: error: undefined symbol: __libc_start1
>>> referenced by crt1_s.S:83 (/usr/src/lib/csu/amd64/crt1_s.S:83)
>>> /usr/lib/crt1.o:(_start)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
configure:4279: $? = 1
configure:4320: result: no
configure: failed program was:

So, ironically, the C compiler is fine. It is the linker ld, which is struggling.

If you create a clean jail and try a build in that, does that resolve anything? Do you have anything odd in your make.conf?
 
Dimitry suggested me to do :

Try running the linker command with --verbose, by passing -Wl,--verbose on the compiler command line.

I really don't understand how.

so,maybe you mean that I should do this ?

marietto:/usr/ports/security/sudo # make -Wl,--verbose

for sure not,because it does not work :

usage: make [-BeikNnqrSstWwX]
[-C directory] [-D variable] [-d flags] [-f makefile]
[-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
[-V variable] [-v variable] [variable=value] [target ...]
 
ziomario
Here we go again.
Are you serious? Have a better look at your calendar, iuyrgfiurhf (put here your favorite curse word). Just because you have itchy skull doesn't make everybody a flower, vegetation or a servant.
People used to do things for a living, you seem to live by giving others a hard time. You are the first candidate to my ignore list. The second is the balanga character. Nothing wrong being stupid, but why spread it?
 
cool down ... stupid questions don't hurt anyone as long as you give just the sensible information, nobody forces you to "hold hands", it's not like he's spreading vaccination fud again...
 
Back
Top