Solved C compiler cannot create executables

jfha73

New Member


Messages: 13

Can somebody remind me how to get rid of this message so a source can be compiled?

Thanks.
 

ShelLuser

Son of Beastie

Reaction score: 1,715
Messages: 3,536

In general (and usually) it means that you're missing certain required (development) libraries.

But we really need more context to be able and get a good idea as to what could be causing all this. Which FreeBSD version, which compiler, and so on...
 
OP
OP
jfha73

jfha73

New Member


Messages: 13

Nope, I found the problem: gcc 4.8 did not create a file for gcc, I had to create it manually using ln -s to gcc48

Thanks anyway.
 

ShelLuser

Son of Beastie

Reaction score: 1,715
Messages: 3,536

Just a tip; although GCC is an excellent compiler do keep in mind that Clang (for example lang/clang34) is a preferred compiler on FreeBSD these days as well. In comparison to the older GCC 4 I think you may even see a nice performance increase as well.

As said; just a tip ;)
 
OP
OP
jfha73

jfha73

New Member


Messages: 13

I was looking for clang in /usr/ports but I couldn't find it, thanks for the tip.
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,638
Messages: 13,850

Nope, I found the problem gcc 4.8 did not create a file for gcc, I had to create it manually using ln -s to gcc48[/cmd]
Patching over problems is likely to cause more problems later when the port is updated.
 
OP
OP
jfha73

jfha73

New Member


Messages: 13

That's correct, if that link would have been created by the port in the first place it would have never happened.
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,638
Messages: 13,850

It is less likely to be such an obvious bug in the port and more likely to be a misunderstanding. Have you entered a bug report or contacted the port maintainer?
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,638
Messages: 13,850

Thinking about it, I don't think this is a bug. The reason it's called gcc48 is that it's possible to have more than one version installed. If the software being built is from ports, the system will handle that. Unported software should try to use cc rather than gcc, or at least try it first.
 
OP
OP
jfha73

jfha73

New Member


Messages: 13

In my case, I don't have multiple versions of gcc installed. It came like that when I did a pkg install gcc, I posted this in their forum so they know.
 

protocelt

Daemon

Reaction score: 410
Messages: 1,253

You don't need to have multiple versions of gcc installed. As wblock@ mentioned, this behavior is likely intended. Certain ports need different versions of gcc installed to build correctly.
 
Top