Jump to page: 1 2
Thread overview
GDC and FreeBSD
Jun 03, 2005
U.Baumanis
Jun 06, 2005
clayasaurus
Jun 07, 2005
U.Baumanis
Jun 07, 2005
U.Baumanis
Jun 07, 2005
U.Baumanis
Jun 07, 2005
U.Baumanis
Jun 07, 2005
U.Baumanis
Jul 23, 2005
tim
June 03, 2005
Hi,
I built GDC 0.12 from ports on the FreeBSD 5.4 (make install clean).
When I tryed to compile a simple test app (gdc -o test test.d),
I got following error:
object.d: cannot read file 'object.d'
what's wrong? Does it need some additional configuration?

--
ub


June 06, 2005
U.Baumanis wrote:
> Hi,
> I built GDC 0.12 from ports on the FreeBSD 5.4 (make install clean).
> When I tryed to compile a simple test app (gdc -o test test.d), I got following error:
> object.d: cannot read file 'object.d'
> what's wrong? Does it need some additional configuration?
> 
> --
> ub
> 
> 

do you have phobos in the right path?
June 07, 2005
In article <d81poi$g0k$2@digitaldaemon.com>, clayasaurus says...
>
>U.Baumanis wrote:
>> Hi,
>> I built GDC 0.12 from ports on the FreeBSD 5.4 (make install clean).
>> When I tryed to compile a simple test app (gdc -o test test.d),
>> I got following error:
>> object.d: cannot read file 'object.d'
>> what's wrong? Does it need some additional configuration?
>> 
>> --
>> ub
>> 
>> 
>
>do you have phobos in the right path?

I don't remember exactly now (it is on an another computer), but I think it is in /usr/local/lib and there is also spec file. At least place looked ok, and there was other libs too.

--
ub


June 07, 2005
U.Baumanis wrote:

>>do you have phobos in the right path?
> 
> I don't remember exactly now (it is on an another computer),
> but I think it is in /usr/local/lib and there is also spec file.
> At least place looked ok, and there was other libs too.

The library is libgphobos.a, in your "lib" folder.
Spec file contains additional libraries to link in.

You also need "include/d/$GCC_VERS/", with object.d,
which has the import modules ("headers") that D needs

--anders

PS. $GCC_VERS would be your GCC version, 3.3.x or 3.4.y
June 07, 2005
In article <d83glu$1poh$1@digitaldaemon.com>, =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
>
>The library is libgphobos.a, in your "lib" folder.
>Spec file contains additional libraries to link in.
>
>You also need "include/d/$GCC_VERS/", with object.d,
>which has the import modules ("headers") that D needs
>
>--anders
>
>PS. $GCC_VERS would be your GCC version, 3.3.x or 3.4.y

Yes, I also have files in include/d/$GCC_VERS/
When I run gcc --version and gdc --version, they have different
numbers. gcc is 3.4.2 (system compiler), but gdc is 3.4.5.
For gdc compilation I had to use gcc 3.4.5 core libs
(make procedure fetched this files for me)
Do I have to set up some environment variable to use gdc?

--
ub



June 07, 2005
U.Baumanis wrote:

> For gdc compilation I had to use gcc 3.4.5 core libs (make procedure fetched this files for me)
> Do I have to set up some environment variable to use gdc?

Just PATH.

I think your versions of GCC should be compatible, but you
could also build a new gcc and a g++ too while you're at it ?

Like: --enable-languages=c,c++,d


You might want to bring the good old "Overbombing" and trace
your call to gdc and see what files it really tries to load ?

Not sure what the command is on FreeBSD, though. (e.g "strace")


You did run the simpler "gdc --verbose nothing.d" first, right ?

--anders
June 07, 2005
In article <d83k0v$1tij$1@digitaldaemon.com>, =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
>
>U.Baumanis wrote:
>
>> For gdc compilation I had to use gcc 3.4.5 core libs
>> (make procedure fetched this files for me)
>> Do I have to set up some environment variable to use gdc?
>
>Just PATH.
>
>I think your versions of GCC should be compatible, but you could also build a new gcc and a g++ too while you're at it ?
>
>Like: --enable-languages=c,c++,d
>
>
>You might want to bring the good old "Overbombing" and trace your call to gdc and see what files it really tries to load ?
>
>Not sure what the command is on FreeBSD, though. (e.g "strace")
>
>
>You did run the simpler "gdc --verbose nothing.d" first, right ?
>
>--anders

gcc core and g++ 3.4.5 libs was compiled when i built gdc.
but when I run gcc --version it is still 3.4.2 (default compiler).
Does it mean that I can run gcc 3.4.5 by some configuration also,
or it's only libs needed for gdc?

What about PATH? gdc is already on the path. I can run it.
Looks like it can not find files in include/d/$GCC_VERS
Is this $GCC_VERS known env variable for gcc? Do I have to set it to
the version of gdc. Do gcc and gdc versions must mach?
Do I have to configure default gcc?
Or do I have to specify path to include/d/$GCC_VERS somewhere?

--
ub


June 07, 2005
U.Baumanis wrote:

> gcc core and g++ 3.4.5 libs was compiled when i built gdc.
> but when I run gcc --version it is still 3.4.2 (default compiler).
> Does it mean that I can run gcc 3.4.5 by some configuration also, or it's only libs needed for gdc?

If the versions of GCC are "compatible" (depends on versions/patches),
then you can use the system C/C++ compilers and link to their libs too.

I use this with GCC 3.3, on the Mac. (under /usr)

If they are "different", then you need to install GDC in an odd location
along with the built versions of gcc / g++ (that were compiled with GDC)

I use this with GCC 3.4, on the Mac. (in /opt/gdc)

> What about PATH? gdc is already on the path. I can run it.

You only need to set PATH if installed in an odd prefix ?

(with --prefix=/opt/gdc, for instance: PATH=/opt/gdc/bin)

> Looks like it can not find files in include/d/$GCC_VERS
> Is this $GCC_VERS known env variable for gcc? Do I have to set it to
> the version of gdc. Do gcc and gdc versions must mach? 

If you have gdc in foo/bin/gdc, then it will automatically
search in foo/include/d and foo/include/d/$GCC_VERS dirs.

You can add additional search directories with the -I flag.

HTH,
--anders
June 07, 2005
>
>If the versions of GCC are "compatible" (depends on versions/patches), then you can use the system C/C++ compilers and link to their libs too.
>
>I use this with GCC 3.3, on the Mac. (under /usr)
>
>If they are "different", then you need to install GDC in an odd location along with the built versions of gcc / g++ (that were compiled with GDC)
>
>I use this with GCC 3.4, on the Mac. (in /opt/gdc)
>
>> What about PATH? gdc is already on the path. I can run it.
>
>You only need to set PATH if installed in an odd prefix ?
>
>(with --prefix=/opt/gdc, for instance: PATH=/opt/gdc/bin)
>
>> Looks like it can not find files in include/d/$GCC_VERS
>> Is this $GCC_VERS known env variable for gcc? Do I have to set it to
>> the version of gdc. Do gcc and gdc versions must mach?
>
>If you have gdc in foo/bin/gdc, then it will automatically search in foo/include/d and foo/include/d/$GCC_VERS dirs.
>
>You can add additional search directories with the -I flag.
>
>HTH,
>--anders

Ok, thanks!
I will play with it in evening again! :-)

May be gdc don't look in include/d/3.4.5/
because default gcc is 3.4.2?

Do I have to force it with -V 3.4.5 ?

--
ub


June 07, 2005
U.Baumanis wrote:
 I will play with it in evening again! :-)
> 
> May be gdc don't look in include/d/3.4.5/
> because default gcc is 3.4.2?
> 
> Do I have to force it with -V 3.4.5 ?

Nah, the GCC version under include/d is the
version of GCC that you patched with GDC
in order to build your "gdc" binary ?

It doesn't have anything to do with the
system/default GCC version, really...

--anders
« First   ‹ Prev
1 2