View mode: basic / threaded / horizontal-split · Log in · Help
October 15, 2012
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:05:17 UTC, H. S. Teoh wrote:
> On Mon, Oct 15, 2012 at 06:45:16AM +0200, Gerry Weaver wrote:
> [...]
>> Unfortunately, I don't. This is a special dev system I setup 
>> for a
>> customer project. They have several 32bit only apps that force 
>> the
>> 32bit requirement. Actually, I would be using D on 64bit 
>> anyway. I
>> just happened to be working on this particular system when I 
>> decided
>> to check out the latest D package. I will try the 64bit 
>> package. In
>> the mean time, I would be more than happy to gather any 
>> information
>> that would help.
> [...]
>
> Hmm. I just tested it on a 32-bit Debian system, using the 
> package from
> the exact URL you gave, and I didn't see any problems. So I'm 
> wondering
> if somehow dmd is picking up the wrong version of Phobos 
> somehow, maybe
> a stale copy somewhere? Maybe a stale /etc/dmd.conf that 
> pointed to the
> wrong version of the library?
>
> (Debian/Ubuntu packages generally do not overwrite modified
> configuration files upon installation -- so if there is an old 
> dmd.conf
> there that has been modified in the past, it will have stayed 
> unchanged
> when you installed the new dmd.  Check if there's a file called
> /etc/dmd.conf.dpkg-new; if there is, rename it to /etc/dmd.conf 
> and see
> if that fixes the problem.)
>
>
> T

Hi,

I checked it out. There is only a dmd.conf. I've included it 
below.

;
; dmd.conf file for dmd
;
; dmd will look for dmd.conf in the following sequence of 
directories:
;   - current working directory
;   - directory specified by the HOME environment variable
;   - directory dmd resides in
;   - /etc directory
;
; Names enclosed by %% are searched for in the existing 
environment and inserted
;
; The special name %@P% is replaced with the path to this file
;

[Environment]

DFLAGS=-I/usr/include/dmd/phobos 
-I/usr/include/dmd/druntime/import -L-L/usr/lib
/i386-linux-gnu -L-L/usr/lib/x86_64-linux-gnu 
-L--no-warn-search-mismatch -L--ex
port-dynamic


Thanks,
-G
October 15, 2012
Re: D seems interesting, but...
On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote:
[...]
> Hi,
> 
> I checked it out. There is only a dmd.conf. I've included it below.
[...]

Strange, I have exactly the same copy of dmd.conf, and I didn't see a
problem. I copy-n-pasted your code into the same filename, etc..

What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is
incompatible with older versions of libc6?


T

-- 
If creativity is stifled by rigid discipline, then it is not true creativity.
October 15, 2012
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote:
> On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote:
> [...]
>> Hi,
>> 
>> I checked it out. There is only a dmd.conf. I've included it 
>> below.
> [...]
>
> Strange, I have exactly the same copy of dmd.conf, and I didn't 
> see a
> problem. I copy-n-pasted your code into the same filename, etc..
>
> What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is
> incompatible with older versions of libc6?
>
>
> T

Hi,

Here's what I've got.

Package: libc6
Multi-Arch: same
Priority: required
Section: libs
Installed-Size: 9125
Maintainer: Ubuntu Developers 
<ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: i386
Source: eglibc
Version: 2.15-0ubuntu10.2
Replaces: belocs-locales-bin, libc6-i386
Provides: glibc-2.13-1, libc6-i686
Depends: libc-bin (= 2.15-0ubuntu10.2), libgcc1, tzdata
Suggests: glibc-doc, debconf | debconf-2.0, locales
Breaks: libhwloc0, liblouis0 (<< 2.3.0-2), liblouisxml1 (<< 
2.4.0-2), nscd (<< 2.15)
Conflicts: belocs-locales-bin, libc6-i686, prelink (<< 
0.0.20090925), tzdata (<< 2007k-1), tzdata-etch
Filename: pool/main/e/eglibc/libc6_2.15-0ubuntu10_i386.deb
Size: 3934936
MD5sum: 941333dcbfcc262636b89e6e387ebe18
Description: Embedded GNU C Library: Shared libraries
 Contains the standard libraries that are used by nearly all 
programs on
 the system. This package includes shared versions of the 
standard C library
 and the standard math library, as well as many others.
Homepage: http://www.eglibc.org
Original-Maintainer: GNU Libc Maintainers 
<debian-glibc@lists.debian.org>

Thanks,
-G
October 15, 2012
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote:
> On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote:
> [...]
>> Hi,
>> 
>> I checked it out. There is only a dmd.conf. I've included it 
>> below.
> [...]
>
> Strange, I have exactly the same copy of dmd.conf, and I didn't 
> see a
> problem. I copy-n-pasted your code into the same filename, etc..
>
> What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is
> incompatible with older versions of libc6?
>
>
> T

Hi,

I was wondering why D doesn't just install everthing in one 
directory (ie; /opt/dlang) and look at an environment variable 
(ie; DLANG_ROOT) to source everything. It seems like it would 
make things a lot simpler. Then the package could be located 
anywhere and multiple versions could be used safely. Quite a few 
other languages have used this approach successfully. Anyway, 
just a thought.

Thanks,
-G
October 15, 2012
Re: D seems interesting, but...
On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote:
> On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote:
> [...]
>> Hi,
>> 
>> I checked it out. There is only a dmd.conf. I've included it 
>> below.
> [...]
>
> Strange, I have exactly the same copy of dmd.conf, and I didn't 
> see a
> problem. I copy-n-pasted your code into the same filename, etc..
>
> What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is
> incompatible with older versions of libc6?
>
>
> T

Hi,

I was wondering why D doesn't just install everthing in one 
directory (ie; /opt/dlang) and look at an environment variable 
(ie; DLANG_ROOT) to source everything. It seems like it would 
make things a lot simpler. Then the package could be located 
anywhere and multiple versions could be used safely. Quite a few 
other languages have used this approach successfully. Anyway, 
just a thought.

Thanks,
-G
October 15, 2012
Re: D seems interesting, but...
On 10/14/2012 11:09 PM, Gerry Weaver wrote:

> I was wondering why D doesn't just install everthing in one directory
> (ie; /opt/dlang)

The .zip version works that way. (At least it used to.) Just unzip in 
any directory:

  http://dlang.org/download.html

> and look at an environment variable (ie; DLANG_ROOT) to
> source everything.

You don't even need to do that. The binary detects where it is started 
from and finds the modules and libraries relative to its path.

Ali

-- 
D Programming Language Tutorial: http://ddili.org/ders/d.en/index.html
October 15, 2012
Re: D seems interesting, but...
On Mon, Oct 15, 2012 at 08:09:54AM +0200, Gerry Weaver wrote:
> On Monday, 15 October 2012 at 05:27:14 UTC, H. S. Teoh wrote:
> >On Mon, Oct 15, 2012 at 07:14:42AM +0200, Gerry Weaver wrote:
> >[...]
> >>Hi,
> >>
> >>I checked it out. There is only a dmd.conf. I've included it below.
> >[...]
> >
> >Strange, I have exactly the same copy of dmd.conf, and I didn't see a
> >problem. I copy-n-pasted your code into the same filename, etc..
> >
> >What version of libc6 do you have? (dpkg -p libc6) Maybe dmd is
> >incompatible with older versions of libc6?
[...]

Hmm, apparently you have a *newer* version of libc6 than I do.
Apparently Debian doesn't have 2.15 yet, so I don't have an easy way to
test this further.



> Hi,
> 
> I was wondering why D doesn't just install everthing in one directory
> (ie; /opt/dlang) and look at an environment variable (ie; DLANG_ROOT)
> to source everything. It seems like it would make things a lot
> simpler. Then the package could be located anywhere and multiple
> versions could be used safely. Quite a few other languages have used
> this approach successfully. Anyway, just a thought.
[...]

I believe the .deb package is simply following Debian/Ubuntu conventions
by putting things in /usr/bin, /usr/lib, /usr/include, etc.. IIRC, /opt
is intended for manually-installed software (at least, that's what the
docs say).

One improvement that *could* be made, though, is to put things in
/usr/include/d/${version}/*, so that specific versions of dmd can find
the right versions of stuff. This was discussed recently, but I don't
remember if a decision was reached.

In any case, I haven't been able to reproduce the problem you're seeing.
I tried installing the package multiple times, upgrading the system
libraries, etc., and everything still works for me, so I'm not sure what
else to say. Seems like there must be some specific combination of
libraries, system or otherwise, that makes dmd not work. Without being
able to examine your environment, it's really hard to tell.


T

-- 
Without geometry, life would be pointless. -- VS
October 15, 2012
Re: D seems interesting, but...
On Monday, 15 October 2012 at 06:20:52 UTC, Ali Çehreli wrote:
> On 10/14/2012 11:09 PM, Gerry Weaver wrote:
>
> > I was wondering why D doesn't just install everthing in one
> directory
> > (ie; /opt/dlang)
>
> The .zip version works that way. (At least it used to.) Just 
> unzip in any directory:
>
>   http://dlang.org/download.html
>
> > and look at an environment variable (ie; DLANG_ROOT) to
> > source everything.
>
> You don't even need to do that. The binary detects where it is 
> started from and finds the modules and libraries relative to 
> its path.
>
> Ali

Hi,

I removed the dmd package and downloaded the .zip. I checked for 
any files that were left behind when the package was removed and 
they are gone. I then ran dmd from the zip package, but I get the 
same result. It would seem that dmd does not work on this 
particular distribution.

Thanks,
-G

Thanks,
-G
October 15, 2012
Re: D seems interesting, but...
On Sun, Oct 14, 2012 at 11:32:30PM -0700, H. S. Teoh wrote:
[...]
> In any case, I haven't been able to reproduce the problem you're seeing.
> I tried installing the package multiple times, upgrading the system
> libraries, etc., and everything still works for me, so I'm not sure what
> else to say. Seems like there must be some specific combination of
> libraries, system or otherwise, that makes dmd not work. Without being
> able to examine your environment, it's really hard to tell.
[...]

Funny, as soon as I said that, I manage to reproduce the same error
messages (though I can't say if it's exactly the problem you're seeing)
by compiling a file that doesn't define main(). In this case, I had a
hello.d with main() renamed to Main():

	import std.stdio;

	void Main() {
		writeln("haha");
	}

Running `dmd hello.d` produced a whole bunch of errors almost exactly
the same as what you're seeing.  Of course, I'm not sure this is exactly
the problem you have, as your code does have a correctly-spelled main()
(from what I can tell). But this may help find where the problem is.

On that note, here's an enhancement request for dmd: if a program is
missing main() for whatever reason, we really should have a more
user-friendly error message than the reams of encrypted Klingon from the
linker that almost nobody understands.


T

-- 
Only boring people get bored. -- JM
October 15, 2012
Re: D seems interesting, but...
On 15-10-2012 08:40, H. S. Teoh wrote:
> On Sun, Oct 14, 2012 at 11:32:30PM -0700, H. S. Teoh wrote:
> [...]
>> In any case, I haven't been able to reproduce the problem you're seeing.
>> I tried installing the package multiple times, upgrading the system
>> libraries, etc., and everything still works for me, so I'm not sure what
>> else to say. Seems like there must be some specific combination of
>> libraries, system or otherwise, that makes dmd not work. Without being
>> able to examine your environment, it's really hard to tell.
> [...]
>
> Funny, as soon as I said that, I manage to reproduce the same error
> messages (though I can't say if it's exactly the problem you're seeing)
> by compiling a file that doesn't define main(). In this case, I had a
> hello.d with main() renamed to Main():
>
> 	import std.stdio;
>
> 	void Main() {
> 		writeln("haha");
> 	}
>
> Running `dmd hello.d` produced a whole bunch of errors almost exactly
> the same as what you're seeing.  Of course, I'm not sure this is exactly
> the problem you have, as your code does have a correctly-spelled main()
> (from what I can tell). But this may help find where the problem is.

Yep, those errors are always a sign that a proper main function is 
missing. I have no idea why you would get it otherwise, though.

>
> On that note, here's an enhancement request for dmd: if a program is
> missing main() for whatever reason, we really should have a more
> user-friendly error message than the reams of encrypted Klingon from the
> linker that almost nobody understands.

https://github.com/D-Programming-Language/dmd/pull/1178

>
>
> T
>

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
1 2 3 4 5 6
Top | Discussion index | About this forum | D home