View mode: basic / threaded / horizontal-split · Log in · Help
June 06, 2005
crc32
I'm having trouble linking with a D library that makes use of phobos' 
crc32 module.  I'm working on a linux platform.

I had a look at phobos source and found this:

file name:  crc32.d

but the module statement inside it says:  module crc;

Why is this?  Shouldn't the module name be "crc32", the same as the file 
name?

Also, my program can't resolve the symbol "getErrno" at link time.

libphobos.a is linked in per command line.  I've checked to see that 
errno.o and crc32.o are part of the library archive.

This is a recent issue since 0.125 (didn't happen on previous versions 
on linux).  The windows version works fine (although it doesn't use 
getErrno).

I'm using build 2.08 to build the libraries and project.  I've spent a 
fair bit of time trying to track down this bug.  In the past, I've been 
mostly successful with bug hunts, but not with this one...  Any 
suggestions would be appreciated.

-JJR
June 06, 2005
Re: crc32
On Mon, 06 Jun 2005 13:53:36 -0700, John Reimer wrote:

> I'm having trouble linking with a D library that makes use of phobos' 
> crc32 module.  I'm working on a linux platform.
> 
> I had a look at phobos source and found this:
> 
> file name:  crc32.d
> 
> but the module statement inside it says:  module crc;
> 
> Why is this?  Shouldn't the module name be "crc32", the same as the file 
> name?

There are a number of misnamed modules in phobos. I think I've sent Walter
a list of these a long, long time ago, but nothing's happened.

> Also, my program can't resolve the symbol "getErrno" at link time.
> 
> libphobos.a is linked in per command line.  I've checked to see that 
> errno.o and crc32.o are part of the library archive.
> 
> This is a recent issue since 0.125 (didn't happen on previous versions 
> on linux).  The windows version works fine (although it doesn't use 
> getErrno).
> 
> I'm using build 2.08 to build the libraries and project.  I've spent a 
> fair bit of time trying to track down this bug.  In the past, I've been 
> mostly successful with bug hunts, but not with this one...  Any 
> suggestions would be appreciated.

Do you still get the getErrno problem when not using Build? I've tried on
Windows and it links it. (import std.c.stdlib;)


-- 
Derek Parnell
Melbourne, Australia
6/06/2005 11:44:26 PM
June 06, 2005
Re: crc32
In article <d811i9$2ukd$1@digitaldaemon.com>, John Reimer says...
>
>I'm having trouble linking with a D library that makes use of phobos' 
>crc32 module.  I'm working on a linux platform.
>
>I had a look at phobos source and found this:
>
>file name:  crc32.d
>
>but the module statement inside it says:  module crc;
>
>Why is this?  Shouldn't the module name be "crc32", the same as the file 
>name?

I agree, and I'd even take it a step further. Move it into std and call it
"std.crc32". I'd like to see "gcstats.d", "object.d", and "unittest.d" be moved
into std, too, but maybe there's a reason why this can't be done.

But at the minimum, I do think that the file name and module name should match
for all of the Phobos modules. This crc32 vs. crc thing is probably just an
oversight.

jcc7
June 06, 2005
Re: crc32
Derek Parnell wrote:
> 
> There are a number of misnamed modules in phobos. I think I've sent Walter
> a list of these a long, long time ago, but nothing's happened.
> 

Ouch!

> Do you still get the getErrno problem when not using Build? I've tried on
> Windows and it links it. (import std.c.stdlib;)
> 
> 

I guess I should give it a try without build.  It's "dool" on linux.  It 
was working before.  I should try compiling with a makefile and see what 
happens.

-JJR
June 06, 2005
Re: crc32
John Reimer wrote:

> I guess I should give it a try without build.  It's "dool" on linux.  It 
> was working before.  I should try compiling with a makefile and see what 
> happens.
> 
> -JJR

I should clarify this: compiling into a library is no problem.  It's 
when I link with another project, like "leds" that the problem surfaces. 
 I can't seem to figure out what's going on, but I'll look into it 
more.  This means I'll have to use a makefile on all projects...

-JJR
June 06, 2005
Re: crc32
On Mon, 06 Jun 2005 23:57:16 -0700, John Reimer wrote:

> John Reimer wrote:
> 
>> I guess I should give it a try without build.  It's "dool" on linux.  It 
>> was working before.  I should try compiling with a makefile and see what 
>> happens.
>> 
>> -JJR
> 
> I should clarify this: compiling into a library is no problem.  It's 
> when I link with another project, like "leds" that the problem surfaces. 
>   I can't seem to figure out what's going on, but I'll look into it 
> more.
Got any messages to go on? It might help someone else figure out what the
problem is. It could be a name mangling thing...?

>  This means I'll have to use a makefile on all projects...

No. If its a mistake in Build, I'll fix it.

-- 
Derek Parnell
Melbourne, Australia
7/06/2005 8:12:53 AM
June 06, 2005
Re: crc32
Derek Parnell wrote:

> 
> Got any messages to go on? It might help someone else figure out what the
> problem is. It could be a name mangling thing...?
> 

Yep... a few.  I should have posted them. I'll post them later tonight. 
 I've been busy today. :P

> 
>> This means I'll have to use a makefile on all projects...
> 
> 
> No. If its a mistake in Build, I'll fix it.
> 

Ah... sorry.  What I meant to say is that I will need to resort to a 
makefile just in order to determine if the problem is in build or not. 
I'm not sure how this could relate to a "build" issue, though, unless 
build isn't linking in the phobos library for some strange reason.  But 
I doubt that's the case because the output clearly indicates that it is 
linking with phobos.  2.08, in all respects so far, seems to working 
very well.

-JJR
June 06, 2005
Re: crc32
On Tue, 07 Jun 2005 05:14:11 -0700, John Reimer wrote:

BTW, can you check the clock setting on your machine. All your latest posts
are "in the future". ;-)


-- 
Derek
Melbourne, Australia
7/06/2005 9:52:13 AM
June 07, 2005
Re: crc32
Derek Parnell wrote:
> On Tue, 07 Jun 2005 05:14:11 -0700, John Reimer wrote:
> 
> BTW, can you check the clock setting on your machine. All your latest posts
> are "in the future". ;-)
> 
> 

Oh darn it... I got caught time-travelling again. I just wanted to see 
what /really/ was going to happen with Apple computers... Honest!

Actually, this is from dual booting into linux and windows.  I don't
know why, but I have to reset the clock for each OS.  Sometimes I 
forget.  This didn't used to happen... but it looks like I've got 
incorrect settings somewhere in my linux config.

-JJR
June 07, 2005
Re: crc32
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Reimer schrieb am Mon, 06 Jun 2005 17:30:44 -0700:
> Derek Parnell wrote:
>> On Tue, 07 Jun 2005 05:14:11 -0700, John Reimer wrote:
>> 
>> BTW, can you check the clock setting on your machine. All your latest posts
>> are "in the future". ;-)
>> 
>> 
>
> Oh darn it... I got caught time-travelling again. I just wanted to see 
> what /really/ was going to happen with Apple computers... Honest!
>
> Actually, this is from dual booting into linux and windows.  I don't
> know why, but I have to reset the clock for each OS.  Sometimes I 
> forget.  This didn't used to happen... but it looks like I've got 
> incorrect settings somewhere in my linux config.

Cause: One of your OSs stores the time in the BIOS with timezone offset
while the other uses GMT or another timezone.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFCpR9/3w+/yD4P9tIRAsgpAJ4/IdklHBnEPZoOR4BnfSc/OaPJ2gCdH3QV
/v0hREDteR3OPAoqAlUhuj0=
=Sxy3
-----END PGP SIGNATURE-----
« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home