ghostbsd / issues

Issue tracker for GhostBSD
BSD 2-Clause "Simplified" License
3 stars 1 forks source link

build simple helloworld.c with make fails -lgcc #186

Open dimitarpeikov opened 3 weeks ago

dimitarpeikov commented 3 weeks ago

Version

24.07.1

What desktop?

Official MATE

Explain the issue and what happens

on fresh GhostBSD installation add 'pkg install GhostBSD-clibs-dev' to get standard libc development environment

write simple helloworld.c and build: $ make helloworld which is executing: $ cc -O2 -pipe -o helloworld helloworld.c toolchain is expecing -lgcc when executing 'ld' to link objects and libraries

in fact -lgcc is not required

Explain how to reproduce the bug?

helloworld.c:

include

int main() { printf("hello world\n"); return 0; };

$ make helloworld

-- compilation failure

What is the Expected behavior (if applicable)

No response

Additional context (if applicable)

No response

ericbsd commented 3 weeks ago

To make everything it is recommended to follow this: https://ghostbsd-documentation-portal.readthedocs.io/en/latest/user/FAQ.html#why-can-t-i-compile-code-or-ports-on-ghostbsd