Solved cc not found (CC is there!)

Hello,

I (try to) build a kernel but I get that error =>
Code:
:cc not found

Indeed, cc is not in /usr/bin...

I did sudo pkg install gcc.
But cc is still not there.

What package must be installed to have cc ?

Thanks
 
After 10.x, default compiler is clang, not gcc.

As far as I know clang is installed with the system, so cc should work.

You may want to read here in case you might have missed anything.
 
After 10.x, default compiler is clang, not gcc.

As far as I know clang is installed with the system, so cc should work.

You may want to read here in case you might have missed anything.
Thanks for answer. ;-)

But I am still loosed, cc is not installed so, what package must be installed...?

Fre;D
 
Re-hello.

Ok, I have copy cc from a other distro.

Now doing cc something => OK, CC exists.

Sadly, when trying to compile kernel, still =>
Code:
cc not found
(Aaaaaaaargh ;-( + ;-( + ;-()
 
On 10.2-RELEASE for example, /usr/bin/CC is included and the following 7 files are all hard links for Clang (note the same inode, the 9648). If you don't have this, something is wrong with your system.
Code:
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/CC*
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/c++*
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/cc*
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/clang*
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/clang++*
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/clang-cpp*
 9648 -r-xr-xr-x  7 root  wheel  28435856 Aug 12 15:27 /usr/bin/cpp*
 
I did sudo pkg install gcc.
But CC is still not there.

A compiler installed from ports would be in /usr/local/bin/. The one missing from /usr/bin/ is in the base system, which means it has been removed. Possibly you built a custom world and overdid it with entries to src.conf(5)?
 
From the src.conf(5) man page:

WITHOUT_CLANG_IS_CC
Set to install the GCC compiler as /usr/bin/cc, /usr/bin/c++ and
/usr/bin/cpp.

It is a default setting on arm/armeb, ia64/ia64, mips/mipsel,
mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/pow‐
erpc, powerpc/powerpc64 and sparc64/sparc64. When set, it also
enforces the following options:

WITHOUT_LLDB

I haven't read that man page super carefully, but it's conceivable that removing Clang without adding this option as well just leaves you without a configured compiler. (There are circumstances--e.g. embedded systems--where having no compiler is reasonable, so automatically replacing CC with something else isn't necessarily the next logical step).

I seem to also recall their being options for make.conf along the lines of
Code:
CC+=/usr/local/bin/gcc
CCPLUS+=/usr/local/bin/gcc

However, they aren't in the make.conf(5) man page anymore, so don't take my word on it.
 
Hello and thanks for attention.

The goal is to have a FreeBSD OS, with all the best:
- multi-arch (can run 32 and 64 bit programs, console and Xorg).
- multi-os (can emulate Linux, Windows (via Wine))
- multi-cross (can cross-compile for nearly everything)
- multi-media (graphic (Xorg) and audio (audio/portaudio), ready to work)
- multi-dev (develop tools ready to use)
- multi-users (easy tools for managing)
- multi-net (all needed to connect, installed and working)
- multi-assist (assistive via voice-synth)

=> All that for the LESS weight possible.

All those "multi" are ready to work, "out of the box off line too", on a live-cd for less than 300 MB.
Of course, you may install the system from Live-CD to device.

For making that system, a "prune" list is used of all the big executables that (seems) not useful.
=> all those files are deleted.

For example (the reason of topic) the C compiler(s).

In the GENERIC distribution, there are in /usr/bin :
CC, cc, cpp, clang-cpp, clang++, clang, c++, => all 28,7 MB and all respond equal.

In the "Light" OS is already installed fpc, cpp, python and java and all those compilers compile ok.

I have try with c++ vs cpp and get the same result.
=> I keep cpp and deleted all the (same) C other compilers.

What is the difference between those compilers?
A symlink would it be not enough?

Now, about compiling the kernel, it will be the final step: a OS easy-ready to off-line re-compile itself.
(and that for less MB possible)

=> cc and cpp are used in the Makefile script.
Added those (same) compilers in /usr/bin and the compilation begins...

After a moment, there is that error message: ;-(

Source downloaded today from svn.

fbsdcompi1.png


What is wrong ?

Thanks.

Fre;D
 
Last edited by a moderator:
The goal is to have a FreeBSD OS, with all the best:
- multi-arch (can run 32 and 64 bit programs, console and Xorg).
- multi-os (can emulate Linux, Windows (via Wine))
- multi-cross (can cross-compile for nearly everything)
- multi-media (graphic (Xorg) and audio (audio/portaudio), ready to work)
- multi-dev (develop tools ready to use)
- multi-users (easy tools for managing)
- multi-net (all needed to connect, installed and working)
- multi-assist (assistive via voice-synth)

=> All that for the LESS weight possible.

All those "multi" are ready to work, "out of the box off line too", on a live-cd for less than 300 MB.
All those multi-Xxx stuff won't make anything near a light OS. There is Ubuntu Linux, which does all those things you mentioned and it is not light. you can run it via a usb memory, though.

For making that system, a "prune" list is used of all the big executables that (seems) not useful.
=> all those files are deleted.

For example (the reason of topic) the C compiler(s).
Well done! .... But hang on a sec, how can you make a "can compile nearly everything" OS without a C compiler. C != C++

In the GENERIC distribution, there are in /usr/bin :
CC, cc, cpp, clang-cpp, clang++, clang, c++, => all 28,7 MB and all respond equal.

In the "Light" os is already installed fpc, cpp, python and java and all those compilers compile ok.

I have try with c++ vs cpp and get the same result.
=> I keep cpp and deleted all the (same) C other compilers.
without knowing what all those things do, and deleting them for the sake of getting rid of "unnecessary programs" is not the way to go.

What is the difference between those compilers?
The difference between those, and why all these files have the same filesize have already been answered in previous posts.

The method you use to achieve your goal suits more to "making a Linux kernel based GNO OS" rather than a FreeBSD system. FreeBSD has already have a selection of "must have" applications for a running system and breaking this harmony may not be a good idea. You deleted some of them, and here you are.

On the other hand, a Linux distro is what you are talking about.... Pieces of software (kernel, tools, compilers, etc) and you put them together to make a useful OS.
 
Last edited by a moderator:
All those multi-Xxx stuff won't make anything near a light OS. There is Ubuntu Linux, which does all those things you mentioned and it is not light. you can run it via a usb memory, though.
Hum, Ubuntu cannot run FreeBSD applications. ;-)

Ubuntu uses Gnome and GTK who are very heavy (and slow and buggy and bad for audio-latency).
Weight (without kernel-compiler) => CD ISO => 313 MB => x2 installed on disk

Well done! .... But hang on a sec, how can you make a "can compile nearly everything" OS without a C compiler. C != C++
Of course there is a (obliged) C compiler (cpp) !
And 2 Free Pascal compilers (fpc 2.6.4 + fpc 3.1.1) (because fpc is the best compiler ;-) )

more to "making a linux kernel based gnu os" rather than a FreeBSD system
Not sure you get it...
It will not be a GNU OS (but a FreeBSD OS with a "pure" Xorg graphic interface, without Qt, nor GTK).
All the GUI extra-applications included where compiled with fpc and widgetset "pure xorg".

By the way, I did that ISO this summer, I do not want to sell anything, all the code used to create the cdrom will be in Github.
And if somebody is interested, I will upload, with pleasure, the ISO on DropBox and Google-Drive.

PS: All that does not solve the problem of "parenthesis error" in syscall.h
 
Last edited by a moderator:
without knowing what all those things do, and deleting them for the sake of getting rid of "unnecessary programs" is not the way to go.
Not so simple... ;-)
The ISO was created from the mfsBSD script of Martin Matuska.
And in that excellent script, there is a "prune" list (and all the C compilers are included).
I let only one...=> cpp.
 
Last edited by a moderator:
Of course there is a (obliged) C compiler (cpp) !

Would you care to guess what "CPP" stands for? (HINT: It's not "C comPPiler.") Both Clang and GCC are capable of compiling both C and C++, but the FreeBSD build system needs to be told which compilers to use for each language. By default, that's Clang. If you don't provide the build system with Clang and don't tell explicitly tell it to use another compiler (for both C and C++), nothing from that language will be compiled.

And in that excellent script, there is a "prune" list (and all the c compilers are included).

What you've done is looked at a list of things you can "cut out" of the existing system, and reasoned that it's okay to cut out everything on the list. But the reason the list is so comprehensive is not because it's okay to cut out so many things--it's because different people and systems have different needs, and so there needs to be the possibility to cut out different things to suit those needs. You can cut out anything, but should not cut out everything. True, it may be possible to cut out lots of stuff, but at the end of the day you still need a functional operating system. You've taken this a step too far.
 
If you don't provide the build system with Clang and don't tell explicitly tell it to use another compiler (for both C and C++), nothing from that language will be compiled.
In previous post, you may see that I used=> # make all COMPILER_TYPE=clang

You've taken this a step too far.
=>
polYdev.png


Ok, I understand, taking about C compiler and asking what compilers are used to compile FreeBSD is something "very sensible".
So I will stop to disturb you.
Many thanks for help and long live to FreeBSD.

Fre;D
 
Last edited by a moderator:
Back
Top