Page 1 of 1

C compiler problems

Posted: Wed Sep 25, 2019 7:38 pm
by dougt
Current GhostBSD, all packages up to date.
Unless I am missing something pretty basic, I cannot compile a "Hello World" c program.
There is a man entry for clang, but no clang.
There is a clang80, but the man page for clang80 says to call clang.
When I use clang80 it can't find <stdio.h>
If I search / for stdio.h, there doesn't appear to be a stdio.h related to clang or llvm80.

I loaded gcc48 and gcc9. Same problem finding <stdio.h>.
But there are include files containing stdio.h for both.
But they are not in a directory that the compilers searches (-v option show search path).
If I copy stdio.h to a directory that gcc48 will search, then I get:
/usr/local/bin/ld: cannot find /usr/lib/libc_nonshared.a
/usr/local/bin/ld: cannot find /usr/lib/libssp_nonshared.a
If I search / for libc_nonshared.a, nothing is found.

To say the least, I am very unimpressed!

Re: C compiler problems

Posted: Thu Sep 26, 2019 9:07 am
by ericbsd
You need to install os-generic-userland-devtools

Re: C compiler problems

Posted: Wed Oct 02, 2019 8:40 pm
by dougt
Eric thanks for your reply

Re: C compiler problems

Posted: Thu Oct 10, 2019 2:43 pm
by litchi
Does it works? I'm sorry there's no pkg name os-generic-userland-devtools

Re: C compiler problems

Posted: Thu Oct 10, 2019 2:48 pm
by ericbsd
litchi wrote: Thu Oct 10, 2019 2:43 pm Does it works? I'm sorry there's no pkg name os-generic-userland-devtools
Yes, it is Unless you are not on the GhostBSD 19.09 or newer.

Code: Select all

pkg search os-generic-userland-devtools
os-generic-userland-devtools-12.1.20190924111836 FreeBSD userland compilers and libraries

Re: C compiler problems

Posted: Thu Oct 10, 2019 3:07 pm
by litchi
Thanks, Eric. I am a newcomer about BSD system. I am very appreciate GhostBSD .
and I have edited/translated GhostBSD wiki into chinese language.
Sorry for my ugly English, can you add a topic about CJKV(Chinese/Japanese/Korean/Vietnamese) in this forum, like french and germany. I can write a little Chinese article to introduce GhostBSD.

Re: C compiler problems

Posted: Thu Oct 10, 2019 3:43 pm
by ericbsd
Yeah, I will try to find time for that and if do not do it in the next week you can PM to remind me, I tend to forget a lot of things.