Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Dec 2023 18:36:04 +0100
From:      Mario Marietto <marietto2008@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        toolchain@freebsd.org
Subject:   Re: ld: error: undefined symbol: __libc_start1
Message-ID:  <CA%2B1FSigdCb2Xm=U4ErTBC_%2BFjrm-4_=MzzK8YxYnhApvH=GDwg@mail.gmail.com>
In-Reply-To: <88692822-B8AB-4445-9D55-1676B0ECC5F4@FreeBSD.org>
References:  <CA%2B1FSihfZnMBRzz4YmCWHSA-t3w8hTr0ctCoPXmsodsL=mMqaw@mail.gmail.com> <88692822-B8AB-4445-9D55-1676B0ECC5F4@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the hint,

but I'm not so experienced. Can you elaborate more on what I should do
? I barely know how to install a port :

root@marietto:/usr/ports/security/sudo # make / make install

so,maybe you mean that I should do this ?

root@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 fil=
e]
           [-V variable] [-v variable] [variable=3Dvalue] [target ...]

On Sun, Dec 31, 2023 at 6:27=E2=80=AFPM Dimitry Andric <dim@freebsd.org> wr=
ote:
>
> On 31 Dec 2023, at 18:15, Mario Marietto <marietto2008@gmail.com> wrote:
> >
> > I'm not able to install sudo on my FreeBSD 14.0-RELEASE-p3 amd64
> >
> > Code:
> >
> > marietto:/usr/ports/security/sudo # make
> >
> > =3D=3D=3D>  License sudo accepted by the user
> > =3D=3D=3D>   sudo-1.9.15p4 depends on file: /usr/local/sbin/pkg - found
> > =3D=3D=3D> Fetching all distfiles required by sudo-1.9.15p4 for buildin=
g
> > =3D=3D=3D>  Extracting for sudo-1.9.15p4
> > =3D> SHA256 Checksum OK for sudo-1.9.15p4.tar.gz.
> > =3D=3D=3D>  Patching for sudo-1.9.15p4
> > =3D=3D=3D>  Applying FreeBSD patches for sudo-1.9.15p4 from
> > /usr/ports/security/sudo/files
> > =3D=3D=3D>   sudo-1.9.15p4 depends on package: pkgconf>=3D1.3.0_1 - fou=
nd
> > =3D=3D=3D>   sudo-1.9.15p4 depends on package: gettext-runtime>=3D0.22_=
1 - found
> > =3D=3D=3D>   sudo-1.9.15p4 depends on executable: msgfmt - found
> > =3D=3D=3D>   sudo-1.9.15p4 depends on file: /usr/local/lib/libcrypto.so=
.12 - found
> > =3D=3D=3D>   sudo-1.9.15p4 depends on shared library: libintl.so - foun=
d
> > (/usr/local/lib/libintl.so)
> > =3D=3D=3D>  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
> > =3D=3D=3D>  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 =3D
> > https://pastebin.ubuntu.com/p/3fCY3hFRCG/
> >
> > /usr/ports/security/sudo/work/sudo-1.9.15p4/config.log =3D
> > https://pastebin.ubuntu.com/p/PK2QxNHwkk/
> >
> > On the log you will see this error :
> >
> > 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 invoca=
tion)
> >
> >
> > that makes me 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. How
> > can I fix it ?
>
> Try running the linker command with --verbose, by passing -Wl,--verbose o=
n the compiler command line. It looks like it is picking up a bad libc some=
how. Maybe some old copy that was never cleaned out?
>
> -Dimitry
>


--=20
Mario.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSigdCb2Xm=U4ErTBC_%2BFjrm-4_=MzzK8YxYnhApvH=GDwg>