Thread overview
RPMS for GDC 0.10
Jan 13, 2005
Thomas Kuehne
Jan 26, 2005
Dejan Lekic
Jan 26, 2005
Dejan Lekic
Jan 26, 2005
Dejan Lekic
Feb 03, 2005
David Friedman
January 13, 2005
Updated the SRPM to GDC version 0.10,
with Thomas' "pedantic clean" patch:
http://www.algonet.se/~afb/d/gdc.spec


You can make binary RPMS by adding missing
source files (listed below) to SOURCES, and:
rpmbuild --rebuild --target=i686 *.nosrc.rpm

Compilation requires that GCC 3.x RPMS
have been installed on the system first.
(should be the default, on new distros)


As before, "gdc-c++" is an optional package
that holds the C++ compiler and headers/libs.
You shouldn't need it to compile C or D code ?

The Mac OS X package (.pkg) is built from RPM,
using the "rpm2pkg" software from RPM4Darwin,
and the SRPM should also compile on Linux PPC.


If anyone can host these, please contact me...

Maybe it's time for a new home page for GDC,
with all the requirements and also binaries -
Perhaps set up a project up at SourceForge ?

--anders

GDC
===

SRPM
http://www.algonet.se/~afb/d/gdc-0.10-3.nosrc.rpm (20K)

SOURCES
> Source0: http://home.earthlink.net/~dvdfrdmn/d/gdc-0.10.tar.bz2 (740K)
> Source1: ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.4.3/gcc-core-3.4.3.tar.bz2 (13M)
> Source2: ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.4.3/gcc-g++-3.4.3.tar.bz2 (2.4M)
> Source3: ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.4.3/gcc-java-3.4.3.tar.bz2 (4.5M)

RPMS (FC 1)
6.5M    gdc-0.10-3.i686.rpm
8.2M    gdc-c++-0.10-3.i686.rpm

OS X (10.3)
 18M    gdc-0.10-3.pkg
 12M    gdc-c++-0.10-3.pkg

Usage: (something like this)
export PATH="/opt/gdc/bin:$PATH"
export LD_LIBRARY_PATH="/opt/gdc/lib:$LD_LIBRARY_PATH"
January 13, 2005
Anders F Björklund wrote:
| Maybe it's time for a new home page for GDC,
| with all the requirements and also binaries -
| Perhaps set up a project up at SourceForge ?

Maybe Berlios, they support Subversion as well as CVS ;)
http://www.berlios.de/index.php.en


Thomas
January 13, 2005
Thomas Kuehne wrote:

> | Perhaps set up a project up at SourceForge ?
> 
> Maybe Berlios, they support Subversion as well as CVS ;)
> http://www.berlios.de/index.php.en

I'll let David decide.

Just have some 100-120 MB of files to upload somewhere... :-)
(more, if RPMS for Red Hat 7/9 or Enterprise Linux is wanted)

--anders
January 26, 2005
Anders thanks a lot for this!
However, I would like GDC to be packed-up in RPM made from "original",
distribution's RPM. In Fedora's case gcc-3.4.x-...rpm . After successfull
build we would end-up with gcc-d-3.4.x-*.iX86.rpm on ix86 platforms. IMHO
this could be accomplished by taking a look at gcc-3.4.x SRPM from Fedora,
or same thing on some other GNU/Linux distributions... In GCC source tree
GDC should follow all naming schemes, and "rules"... This would make things
a lot easier i think...

-- 
...........
Dejan Lekic
  http://dejan.lekic.org

January 26, 2005
Dejan Lekic wrote:

> Anders thanks a lot for this!

You're welcome :-) Hope it worked OK ?

> However, I would like GDC to be packed-up in RPM made from "original",
> distribution's RPM. In Fedora's case gcc-3.4.x-...rpm . After successfull
> build we would end-up with gcc-d-3.4.x-*.iX86.rpm on ix86 platforms. IMHO
> this could be accomplished by taking a look at gcc-3.4.x SRPM from Fedora,
> or same thing on some other GNU/Linux distributions... In GCC source tree
> GDC should follow all naming schemes, and "rules"... This would make things
> a lot easier i think...

That would be nice, but a lot more work.


First, there are a lot of different versions of GCC out there.
Each of them; Red Hat, Apple, or Fedora with their own patches.
Even GDC needs a small patch to GCC sources in order to compile.

Second, some system GCC versions are GCC 3.2 or even GCC 2.96 that
doesn't work with GDC - so it would fail on those platforms as well.
(and on Mac OS X, for instance, even GCC 3.3 is rather "mutated"...)

You also get a nasty conflict between bin/dmd and lib/libphobos.a,
from the regular DMD compiler on the supported platforms for that.

So for now, it's a *lot* easier to use the /opt/gdc hierarchy ?


You are of course welcome to experiment.

--anders

PS. The best would of course be if D could be accepted as a new
    top-level standard language for GCC, along with the others:
    C, C++, Objective-C, Fortran, Ada, and Java (GCJ)
January 26, 2005
Well, we could easily talk to Fedora guys and provide necessary files so D can be supported in the future in Fedore by default. IMHO it shouldn't be that difficult to provide gcc-d-3.4.x-y.src.rpm to them.

BTW are you in Stockholm perhaps?

Kind regards

Dejan

-- 
...........
Dejan Lekic
  http://dejan.lekic.org

January 26, 2005
Dejan Lekic wrote:

> Well, we could easily talk to Fedora guys and provide necessary files so D
> can be supported in the future in Fedore by default. IMHO it shouldn't be
> that difficult to provide gcc-d-3.4.x-y.src.rpm to them.

Feel free to give it a try, and post the gcc34.spec patch to this forum:

http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/gcc-3.4.3-17.src.rpm

All the gcc-*** language subpackages are built from the same source RPM.


I'm more interested in getting GDC working with GCC 4.0, in the long run

> BTW are you in Stockholm perhaps?

I'm in Göteborg, on the other coast :-)

--anders
January 26, 2005
Yep I know - I lived there before. :)

Btw. what could be wrong here:
dejan@gnu ~/src/d/samples
$ /opt/gcc/bin/gcc -o proggy hello.d
gcc: unknown spec function `d-all-sources'

Maybe i am missing -spec=<something> here?

-- 
...........
Dejan Lekic
  http://dejan.lekic.org

February 02, 2005
Dejan Lekic wrote:

> Btw. what could be wrong here:
> dejan@gnu ~/src/d/samples
> $ /opt/gcc/bin/gcc -o proggy hello.d
> gcc: unknown spec function `d-all-sources'

Try using the "gdc" compiler, for D source ?
Or the regular "dmd" wrapper: dmd hello.d
(will compile and link a "hello" program)

It might be possible to get GCC to guess the
D language based on the suffix, but it's not
working just at the moment (even with "-x d")

Seems like we need a Getting Started manual...

--anders
February 03, 2005
Anders F Björklund wrote:
> Dejan Lekic wrote:
> 
>> Btw. what could be wrong here:
>> dejan@gnu ~/src/d/samples
>> $ /opt/gcc/bin/gcc -o proggy hello.d
>> gcc: unknown spec function `d-all-sources'
> 
> 
> Try using the "gdc" compiler, for D source ?
> Or the regular "dmd" wrapper: dmd hello.d
> (will compile and link a "hello" program)
> 
> It might be possible to get GCC to guess the
> D language based on the suffix, but it's not
> working just at the moment (even with "-x d")
> 
> Seems like we need a Getting Started manual...
> 
> --anders

This was an oversight that I didn't get around to fixing until recently.  Here's a patch for lang-specs.h for those who don't want to wait for the next release.

David

--- lang-specs.h	(revision 27)
+++ lang-specs.h	(working copy)
@@ -30,9 +30,16 @@
 {".HTML", "@d", 0},
 {".htm", "@d", 0},
 {".HTM", "@d", 0},
-#endif
 {".d", "@d", 0},
 {".D", "@d", 0},
 {"@d",
      "%{!E:cc1d %i %:d-all-sources() %(cc1_options) %{nostdinc*} %{+e*} %{I*}\
       %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", 0},
+#else
+{".d", "@d", 0},
+{".D", "@d", 0},
+{"@d",
+     "%{!E:cc1d %i %(cc1_options) %{nostdinc*} %{+e*} %{I*}\
+      %{M} %{MM} %{!fsyntax-only:%(invoke_as)}}", 0},
+#endif