C compiler problems

Need support for GhostBSD. Ask here if your question does not fit elsewhere.
Post Reply
dougt
Posts: 4
Joined: Mon Sep 23, 2019 2:13 pm
Has thanked: 0
Been thanked: 0

C compiler problems

Post by dougt » Wed Sep 25, 2019 7:38 pm

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!

User avatar
ericbsd
Developer
Posts: 1396
Joined: Mon Nov 19, 2012 7:54 pm
Has thanked: 36 times
Been thanked: 46 times

Re: C compiler problems

Post by ericbsd » Thu Sep 26, 2019 9:07 am

You need to install os-generic-userland-devtools

dougt
Posts: 4
Joined: Mon Sep 23, 2019 2:13 pm
Has thanked: 0
Been thanked: 0

Re: C compiler problems

Post by dougt » Wed Oct 02, 2019 8:40 pm

Eric thanks for your reply

litchi
Posts: 4
Joined: Wed Sep 25, 2019 1:03 pm
Has thanked: 0
Been thanked: 0

Re: C compiler problems

Post by litchi » Thu Oct 10, 2019 2:43 pm

Does it works? I'm sorry there's no pkg name os-generic-userland-devtools

User avatar
ericbsd
Developer
Posts: 1396
Joined: Mon Nov 19, 2012 7:54 pm
Has thanked: 36 times
Been thanked: 46 times

Re: C compiler problems

Post by ericbsd » Thu Oct 10, 2019 2:48 pm

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

litchi
Posts: 4
Joined: Wed Sep 25, 2019 1:03 pm
Has thanked: 0
Been thanked: 0

Re: C compiler problems

Post by litchi » Thu Oct 10, 2019 3:07 pm

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.

User avatar
ericbsd
Developer
Posts: 1396
Joined: Mon Nov 19, 2012 7:54 pm
Has thanked: 36 times
Been thanked: 46 times

Re: C compiler problems

Post by ericbsd » Thu Oct 10, 2019 3:43 pm

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.

Post Reply