WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gcc-4.4.0 errors - something missing?  (Read 11512 times)

Offline oleg

  • Newbie
  • *
  • Posts: 20
gcc-4.4.0 errors - something missing?
« on: February 09, 2010, 11:01:11 PM »
I booted empty TC, then installed gcc-4.4.0 and tried to compile "hello world" program. Compilation failed with errors that compiler cannot find some libraries.

Does this mean that dependencies for gcc-4.4.0 are not correct?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14625
Re: gcc-4.4.0 errors - something missing?
« Reply #1 on: February 09, 2010, 11:18:59 PM »
Could you cut & paste the errors?

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #2 on: February 09, 2010, 11:48:46 PM »
The file I am trying to compile is
#include <iostream>
int main(){ std::cout<<"a"; }

In one case I am getting this message:
 /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/cc1plus: error while loading shared libraries: libcloog.so.0: cannot open shared object file: No such file or directory

but this is the installation with a few other extensions and with persistent hda1

In the other case where TC is just in cloud mode the messages are the following

In file included from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/i686-pc-linux-gnu/bits/c++config.h:243,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/iostream:39,
                 from /mnt/hda1/a.cpp:1:
/tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/i686-pc-linux-gnu/bits/os_defines.h:39:22: error: features.h: No such file or directory
In file included from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/bits/postypes.h:42,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/iosfwd:42,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ios:39,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ostream:40,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/iostream:40,
                 from /mnt/hda1/a.cpp:1:
/tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/cwchar:47:19: error: wchar.h: No such file or directory
In file included from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/i686-pc-linux-gnu/bits/c++locale.h:42,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/bits/localefwd.h:42,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ios:42,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ostream:40,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/iostream:40,
                 from /mnt/hda1/a.cpp:1:
/tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/clocale:44:20: error: locale.h: No such file or directory
In file included from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/bits/localefwd.h:44,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ios:42,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ostream:40,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/iostream:40,
                 from /mnt/hda1/a.cpp:1:
/tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/cctype:44:19: error: ctype.h: No such file or directory
In file included from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/i686-pc-linux-gnu/bits/gthr.h:162,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/ext/atomicity.h:34,
                 from /tmp/tcloop/gcc-4.4.0/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.4.0/../../../../include/c++/4.4.0/bits/ios_base.h:41,

...

and so on for 60Kb

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14625
Re: gcc-4.4.0 errors - something missing?
« Reply #3 on: February 09, 2010, 11:56:58 PM »
error while loading shared libraries: libcloog.so.0: cannot open shared object file: No such file or directory
This is because the cloog extension is missing - did you load the gcc-4.4.0 extension with the appsbrowser? If so, this would automatically load the required dependencies - libgmp, libmpfr, ppl and cloog - for you.

The other errors would probably by cured by loading the base-dev extension. I'm not sure, strictly speaking, whether I should add base-dev to the deps or not.

Be sure to read the info file: http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/gcc-4.4.0.tcz.info, which is also displayed by the appsbrowser.

BTW - unless you specifically need gcc-4.4.0, I would recommend to use the compiletc meta extension, which will automatically download most things required to compile on microcore/tinycore, including the version of gcc used to build microcore/tinycore.
« Last Edit: February 10, 2010, 12:01:25 AM by Juanito »

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #4 on: February 10, 2010, 12:07:13 AM »
Thank you. I will try base-dev.

Yes, in the first case I installed it with "tce-load -i" from local directory. But, all dependencies where in the directory, and I tried to re-install with AppBrowser. Even if I reboot and install gcc again using Appbroswer I am getting the same error message! That looks strange.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14625
Re: gcc-4.4.0 errors - something missing?
« Reply #5 on: February 10, 2010, 12:17:14 AM »
Yes, in the first case I installed it with "tce-load -i" from local directory. But, all dependencies where in the directory, and I tried to re-install with AppBrowser. Even if I reboot and install gcc again using Appbroswer I am getting the same error message! That looks strange.

If you look in /tmp/tcloop - do you see libgmp, libmpfr, ppl and cloog?

If you are loading locally with either tce-load or appsbrowser, you'll need the five extensions and gcc-4.4.0.tcz.dep in the same directory.

Otherwise  - you can load the 5 extensions one-by-one

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #6 on: February 10, 2010, 02:22:18 AM »
I installed base-dev. But now got another error:
g++: error trying to exec 'as'.

What extension is 'as' in?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: gcc-4.4.0 errors - something missing?
« Reply #7 on: February 10, 2010, 02:26:51 AM »
Just curious. Is there any specific reason why are you using gcc-4-4.0 instead of 4.2.2 used as default compiler in TC?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #8 on: February 10, 2010, 02:43:49 AM »
No reason. Before I used version <4. Now when I start playing with TC i looked at the greatest gcc version number. Probably I will install 4.2.2 later. But it would be good to get to the bottom of 4.4.0.

I feel that if you take naked system and install any extension it should take care of all dependencies. Obviously if many installed one can have inconsistencies. But if the system initially clean, then any extension should work with no problem.
« Last Edit: February 10, 2010, 02:50:08 AM by oleg »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: gcc-4.4.0 errors - something missing?
« Reply #9 on: February 10, 2010, 02:51:28 AM »
In this case I would suggest to use base-dev.tcz which installs the staddard development environment, used to create extensions.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #10 on: February 10, 2010, 02:52:53 AM »
I installed base-dev. But got an error about 'as'.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14625
Re: gcc-4.4.0 errors - something missing?
« Reply #11 on: February 10, 2010, 03:08:49 AM »
You need binutils-2.19.1 for this.

Did you read the info file?
Did you see the earlier comment about compiletc?
« Last Edit: February 10, 2010, 03:12:34 AM by Juanito »

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #12 on: February 10, 2010, 03:28:01 AM »
I installed binutils and got the following errors:
/tmp/cc3C7ehf.s: Assembler messages:
/tmp/cc3C7ehf.s:13: Error: unknown pseudo-op: `.cfi_personality'
/tmp/cc3C7ehf.s:34: Error: unknown pseudo-op: `.cfi_personality'
/tmp/cc3C7ehf.s:62: Error: unknown pseudo-op: `.cfi_personality'

Yes, I read info file. I did not know that you have to install dependencies manually. Is there a reason not to include them into dep file?

I will try compiletc. Do you think it is not worthwhile to fix 4.4.0?

------------
Correction. Sorry I just installed binutils instead of binutils-2.19.1 as you said. I will reinstall it and try again...
« Last Edit: February 10, 2010, 03:29:58 AM by oleg »

Offline oleg

  • Newbie
  • *
  • Posts: 20
Re: gcc-4.4.0 errors - something missing?
« Reply #13 on: February 10, 2010, 03:32:11 AM »
Now it worked fine. Thank you.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14625
Re: gcc-4.4.0 errors - something missing?
« Reply #14 on: February 10, 2010, 03:41:13 AM »
I will try compiletc. Do you think it is not worthwhile to fix 4.4.0?

if you install compiletc from the on-line repo with appbrowser, it will install a complete compile environment.

gcc-4.4.0 was added for use in more exotic situations by users somewhat used to microcode/tinycore and this is why it does not install all deps

I'd really recommend using compiletc until you get the hang of it and unless there is a pressing reason not too
« Last Edit: February 10, 2010, 03:48:10 AM by Juanito »