Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/lto-wrapper
Target: x86_64-portbld-freebsd12.0
Configured with: /wrkdirs/usr/ports/lang/gcc8/work/gcc-8.3.0/configure --enable-multilib --with-build-config=bootstrap-debug --disable-nls --enable-gnu-indirect-function --libdir=/usr/local/lib/gcc8 --libexecdir=/usr/local/libexec/gcc8 --program-suffix=8 --with-as=/usr/local/bin/as --with-gmp=/usr/local --with-gxx-include-dir=/usr/local/lib/gcc8/include/c++/ --with-ld=/usr/local/bin/ld --with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --enable-languages=c,c++,objc,fortran --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/share/info/gcc8 --build=x86_64-portbld-freebsd12.0
Thread model: posix
gcc version 8.3.0 (FreeBSD Ports Collection)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/cc1 -quiet -v main.c -quiet -dumpbase main.c -mtune=generic -march=x86-64 -auxbase main -version -o /tmp//ccD7LMZJ.s
GNU C17 (FreeBSD Ports Collection) version 8.3.0 (x86_64-portbld-freebsd12.0)
compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/include-fixed"
ignoring nonexistent directory "/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/../../../../../x86_64-portbld-freebsd12.0/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/include
/usr/local/include
/usr/include
End of search list.
GNU C17 (FreeBSD Ports Collection) version 8.3.0 (x86_64-portbld-freebsd12.0)
compiled by GNU C version 8.3.0, GMP version 6.1.2, MPFR version 4.0.2, MPC version 1.1.0, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: dd06a9b5f68761221f73f31b1557edca
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/usr/local/bin/as -v -o /tmp//ccwd2t4G.o /tmp//ccD7LMZJ.s
GNU assembler version 2.32 (x86_64-portbld-freebsd12.0) using BFD version (GNU Binutils) 2.32
COMPILER_PATH=/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/:/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/:/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/:/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/:/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/:/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/../../../../../x86_64-portbld-freebsd12.0/bin/
LIBRARY_PATH=/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/:/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/../../../../../x86_64-portbld-freebsd12.0/lib/:/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'
/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/collect2 -plugin /usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/liblto_plugin.so -plugin-opt=/usr/local/libexec/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp//ccvnFRJD.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_x86_64_fbsd -V -dynamic-linker /libexec/ld-elf.so.1 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/crtbegin.o -L/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0 -L/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/../../../../../x86_64-portbld-freebsd12.0/lib -L/usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/../../.. /tmp//ccwd2t4G.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/lib/gcc8/gcc/x86_64-portbld-freebsd12.0/8.3.0/crtend.o /usr/lib/crtn.o
/usr/local/bin/ld: cannot find /usr/lib/libc_nonshared.a
/usr/local/bin/ld: cannot find /usr/lib/libssp_nonshared.a
collect2: error: ld returned 1 exit status
As I'm new to the bsd world, I thought I would have misconfigured something.
So I've retested on naked system (just installation, tested before and after updating the system, no additional development packages installed)
I believe this is a bug, If a compiler is present, it should also work.
If it is not intended to work, then maybe it should not be there, and installing a compiler should install as dependency all libraries for compiling a minimal program.
What should I install for being able to compile c and c++ programs?
I could not find any package containing libc_nonshared and libssp_nonshared, those libraries do not seem to be present on trident, but are on freebsd.
Notice that on a minimal freebsd system cc was avaiable (it was on none of the tested trident systems) and I could build main.c without issues and without installing additional packages.
The C program is simply:
> cat main.c
int main(void) {
return 0;
}
The text was updated successfully, but these errors were encountered:
fekir
changed the title
Unable to compiile c program on freebsd stable
Unable to compiile c program on trident stable
Aug 24, 2019
fekir
changed the title
Unable to compiile c program on trident stable
Unable to compile c program on trident stable
Aug 24, 2019
thank you, installing the os-generic-userland-devtools package fixed the issue, and also created cc.
Might I ask how one should have diagnosed the problem in order to understand what package he needed to install?
I was not able to find any hint, and my experience with BSD systems is limited.
Also does it make sense for trident to have some program with broken dependencies installed by default?
AFAIK the compiler is not usable, wouldn't it be better not having it at all?
Describe the bug
I'm unable to compile a simple c test program in
trident, neither withclang, nor withgcc.To Reproduce
Install
trident.Optionally install
gccor other clang versionsCompile a simple program
See error on
stderrExpected behavior
No error in
stderr, and a working executable as output from the compiler.OS Version:
Additional context
Hello,
I've played a little bit with trident, I'm sorry if I'm reporting this bug (or at least inconsistent behavior for which I found no documentation)
I've installed trident from the dvd, and after it different packages for developing in c++ and c, like clang, gcc, cppcheck and so on.
Unfortunately I'm not able to compile even a simple test program.
stderror of (verbose) gcc (gcc -v main.c)
As I'm new to the bsd world, I thought I would have misconfigured something.
So I've retested on naked system (just installation, tested before and after updating the system, no additional development packages installed)
I believe this is a bug, If a compiler is present, it should also work.
If it is not intended to work, then maybe it should not be there, and installing a compiler should install as dependency all libraries for compiling a minimal program.
What should I install for being able to compile c and c++ programs?
I could not find any package containing
libc_nonsharedandlibssp_nonshared, those libraries do not seem to be present ontrident, but are onfreebsd.Notice that on a minimal freebsd system
ccwas avaiable (it was on none of the tested trident systems) and I could buildmain.cwithout issues and without installing additional packages.The C program is simply:
The text was updated successfully, but these errors were encountered: