GCC cannot be installed due to mpfr binutils and other packages already installed

Dear all,
thank you for Haiku. I installed Haiku fine under VMWare Player 17. First thing I did next was to install gcc:

what could be done?

I was able to install by deleting the mpfr, binutils, mpc, and whatever other package was already installed in /boot/system/packages/ . The question is why the packages going to be installed go in /boot/system/packages/administrative ? If they were downloaded in packages/ only the non already existing should be copied. On the other hand, if both directories (packages/, packages/administrative/) are checked for double packages, why should the existence of mpfr in both places should be a problem for the installation to continue. It could just be a warning that could also ask for removal of double packages after successful installation?

Other than that after the installation, trying to compile a simple file I get the following problem which I have also see in the latest GhostBSD.

In file included from /boot/system/develop/tools/lib/gcc/x86_64-unknown-haiku/13.3.0/include/c++/bits/postypes.h:40,
from /boot/system/develop/tools/lib/gcc/x86_64-unknown-haiku/13.3.0/include/c++/iosfwd:42,
from /boot/system/develop/tools/lib/gcc/x86_64-unknown-haiku/13.3.0/include/c++/ios:40,
from /boot/system/develop/tools/lib/gcc/x86_64-unknown-haiku/13.3.0/include/c++/ostream:40,
from /boot/system/develop/tools/lib/gcc/x86_64-unknown-haiku/13.3.0/include/c++/iostream:41,
from independent.cpp:1:
/boot/system/develop/tools/lib/gcc/x86_64-unknown-haiku/13.3.0/include/c++/cwchar:44:10: fatal error: wchar.h: No such file or directory
44 | #include <wchar.h>
| ^~~~~~~~~
compilation terminated.

It seems you have fallen victim to some bug, gcc is already installed by default. So not sure why installing it was offered.

The errror means what is sais. The package that is supposed to be activated, mfpr, which is needed for gcc already is activated.
So the system (or haikudepot) somehow got confused as to wether gcc is already installed.

1 Like

Just read the warning: package does already exist!
And: Status-Tab: Available!

So nothing to do!

gcc is not installed by default. Typing gcc says program not found.

I downloaded the haiku image from the website. After running it under vmware player either from the CD or after installation on the hard disk, gcc is not installed. Is there any alternative image with development tools already installed?

The installation is interrupted because of this error. Typing gcc afterwards, the program is not there (command not found). So there is something to do.

The first reply is by me. If you read it you will see there is an additional problem that has to do with the package itself. It is buggy. I have seen the same problem about wchar.h in many systems. I do not know why all of these operating systems (GhostBSD, OmniOS, Haiku) have messed up something with gcc ports and trying to compile a hello world .cpp file you get this stupid wchar.h error.

I just downloaded and installed haiku-master-hrev58228-x86_64-anyboot.zip, and gcc is indeed installed by default there.

And I’m just looking right now at the beta5 installer (haiku-r1beta5-x86_64-anyboot.iso)… if I click on “Show optional packages”… I see gcc and its dependencies (among other packages) marked for installation by default.

Not sure why you see anything different. Link the image/iso you used, just in case it is somehow broken?

What happens if you uncheck GCC on Installation? Maybe that’s how you can reproduce the issue.

http://mirror.rit.edu/haiku/r1beta5/haiku-r1beta5-x86_64-anyboot.iso

This is the image I installed under VMWare

Given that’s beta5… unless you had deselected gcc during install, then I guess you just hit some weird bug.

I’ve seen packagefs get “confused” regarding which package are actually active/installed, but I do all sorts of weird stuff with my installs (while working on HaikuPorts recipes). My usual “fix” for weird issues there is to just remove the activated-packages file under /system/packages/administrative/, followed by a reboot.

But I’m just a cavemen, and surely the devs will come up with better advice :slight_smile:

gcc is so basic as a port or any other compiler such as clang, that I am really surprised no one really verifies if it gets properly installed. Also do not forget the wchar.h problem, which is not only a Haiku ports problem but I have seen it also in OmniOS, GhostBSD etc.

I assume it’s an individual issue on your installation, otherwise someone else would surely have stumbled upon it.

That’s because we have been developing with it for years… In any case this sort of behaviour isn’t going to help you here. Either this is just “baiting” to draw people into an argument or the tactic of “just tell people linux sucks because problem X to get free tech support for it”

You’ve already been told that gcc is preinstalled.

If you have further issues with it please open a ticket on the bugtracker with the standard “what happened” “what did you expect to happen” “what happened instead” questions answered.

The only unconventional thing I did before installing Haiku, was to install while booting on the live CD vmware_addons at first to check what works and what does not. Then I proceeded with the installation of Haiku on the disk. That is all. GCC was not installed. I cannot understand why.

@nephele, if you have a working installation of Haiku, could you try to uninstall gcc and reinstall it again to see if you can reproduce the problem with wchar.h not found?

Do you have the haiku_devel package installed? If not, then that’ll be why wchar.h is missing.

How can I guess that I need to install the haiku_devel package if there is not any gcc in that name? Guys this is insane. Everything related and everything needed for gcc to be installed and compile something without errors should be a part of the gcc port. Otherwise when I install the gcc port assuming that I will have a working compiler, what exactly gets installed if a part of the port essential for compiling is missing?

As has been pointed out, a successful installation has the haiku_devel package installed, as well as gcc. Either your installation wasn’t successful, or packages were removed somehow or by someone.

I’ve installed Beta5 images a few times and the dev tools were always there.