gcc-ada?

This forum is for discussion about general software issues.

gcc-ada?

Postby doragasu1 » Mon Jan 26, 2015 4:08 pm

I need gcc-ada to build ghdl (for an ARM Chromebook), but unfortunately, it is not in the repos. So I decided to try building it using the archlinux (i.e. not archlinuxarm) ABS pkgbuild. Then I found a chicken/egg problem: to build gcc-ada, I need gcc-ada (it is in the makedepends)...

Did anyone succeed building it? any suggestions?
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: gcc-ada?

Postby WarheadsSE » Mon Jan 26, 2015 5:47 pm

Sounds like you need to bootstrap it :) Fun!
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: gcc-ada?

Postby doragasu1 » Tue Jan 27, 2015 8:57 am

[runs to wikipedia to learn what "bootstrapping a compiler" is]
[Scratches head...]
[googles "bootstrap gcc ada"]
[Scratches head...]

It looks like this is something I'll have to postpone until I have some more spare time :lol:
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: gcc-ada?

Postby doragasu1 » Wed Jan 28, 2015 11:01 am

I gave it another try, but I'm out of luck. This is the strategy I followed:

1. Create a clean chroot: sudo makearchroot chroot/root base base-devel sudo
2. Download Debian jessie packages for gcc, gnat, gnat-base, libgnat, libgnatprj, libgnatvsn. Uncompress the files.
3. Symlink gcc-4.9, gcc-ranlib-4.9, etc. removing the "-4.9" and copy the files into the chroot.
4. Edit the abs PKGBUILD, commenting out the makedepends and doxygen lines.
5. From the PKGBUILD directory: sudo makechrootpkg -cr ../chroot

At the first try, building failed because cc1 was not found. Then I tried symlinking /usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/cc1 to /usr/bin/cc1.

The second try complained about missing liblto_plugin.so library, so again I symlinked /usr/lib/x86_64-unknown-linux-gnu/4.9.2/liblto_plugin.so to /usr/lib/gcc/x86_64-linux-gnu/4.9/liblto_plugin.so.

The third try trown this error: "/usr/bin/ld: this linker was not configured to use sysroots".

And this is where I don't know what else to do... I suspect the problem may be caused because I'm mixing two different versions of gcc (4.9.2 and 4.9.1) using different directory structures, but I don't know how to continue...

EDIT: As any awake reader may have noticed, I'm trying to build it on x86_64 architecture. Once it builds, It should be easy moving to arm, as Debian packages are also available for armhf.
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm

Re: gcc-ada?

Postby doragasu1 » Wed Jan 28, 2015 2:44 pm

Got the x86_64 build working (well, it has not yet finished, but it has been passing tests for almost an hour and looks good) by using Fedora packages instead of Debian ones! Unfortunately repeating the sequence fails on my ARM chromebook. makechrootpkg fails without leaving any hints about why:

$this->bbcode_second_pass_code('', '$ sudo makechrootpkg -c -r ../chroot
==> Creating clean working copy [jalon]...done
==> Making package: gcc 4.9.2-2 (Wed Jan 28 15:01:34 CET 2015)
==> Retrieving sources...
-> Found gcc-4.9-20141224.tar.bz2
-> Found isl-0.12.2.tar.bz2
-> Found cloog-0.18.1.tar.gz
-> Found gcc-4.8-filename-output.patch
==> Validating source files with md5sums...
gcc-4.9-20141224.tar.bz2 ... Passed
isl-0.12.2.tar.bz2 ... Passed
cloog-0.18.1.tar.gz ... Passed
gcc-4.8-filename-output.patch ... Passed
==> ERROR: Build failed, check /run/media/jalon/IORI_RAID/tmp/gnat/chroot/jalon/build')

The only thing inside /run/media/jalon/IORI_RAID/tmp/gnat/chroot/jalon/build is .gnupg directory... Any ideas?

Also maybe makechrootpkg is somehow broken or I don't know how to use it. It is supposed to pass arguments to makepkg after '--' marker, but when I tried to pass the --ignorearch switch like this:

$ sudo makechrootpkg -c -r ../chroot -- --ignorearch

it did not work (I had to edit the PKGBUILD and add 'armv7h' arch).

(BTW, maybe this thread should be moved to the development section).
doragasu1
 
Posts: 100
Joined: Sun Jun 03, 2012 3:52 pm


Return to General

Who is online

Users browsing this forum: No registered users and 50 guests