June 25, 2010
En/na Ellery Newcomer ha escrit:
> On 06/24/2010 01:14 PM, Jordi Sayol i Salomó wrote:
>> En/na Ellery Newcomer ha escrit:
>>>
>>> Also note that mine doesn't fail on x86_64
>>>
>>> (you need to add glibc-devel(x86-32) specifically as a dependency)
>>>
>>
>> Can You be more explicit?
>> I've not a 64 bit system available.
>>
> 
> dmd links to ctnrl.o or something like that, which is in glibc-devel and must be 32 bit. If the 32 bit version ain't there, there  be linker errors on compile.
> 
> in the spec file, after
> 
> Requires:    gcc
> 
> add
> 
> Requires:    glibc-devel(x86-32)
> 
> I know nothing of specific minimum version or anything like that, though.
> 

Many thanks for Your answer.

This rpm package is build for a i386 platform, and it's only installable on a i386 system (without force it to), so the dependencies are for i386 installation. Of course It can be forced to install in another platform as x86_64, alpha, arm, hppa, mips, mipsel, powerpc, s390, sparc, etc. but I cannot assure that the compiler will work on all of them. You talk about the glibc-devel package, but this is not the only one needed by the compiler, dmd also needs gcc (32 bits) and in Your rpm (as in mine) do not specifies anything about arch, also there is a missing library on Your rpm, libgcc_s.so.1 is needed too by dmd.

One solution for this problem is to explain the trick needed to install the ix86 dmd rpm package on a x86_64 system, as Walter has done with the same situation for the dmd deb package, http://www.digitalmars.com/d/2.0/dmd-linux.html#installation

Another one is to create a x86_64 rpm package of dmd 32 bits compiler. I don't like this solution because when dmd 64 bits appears in the near future, this will be a source of confusion.

And My preferred solution, create a i386 chroot machine inside Your x86_64 system, install dmd package on it and compile Yours  D programs on it too.

I apologize for my bad English.

Best regards,
-- 
Jordi Sayol




June 25, 2010
On 06/24/2010 11:51 PM, Lars T. Kyllingstad wrote:
> On Thu, 24 Jun 2010 21:26:09 -0500, Ellery Newcomer wrote:
>
>> On 06/24/2010 08:40 PM, Andrei Alexandrescu wrote:
>>> On 06/24/2010 03:44 PM, Ellery Newcomer wrote:
>>>> On 06/24/2010 12:09 PM, Walter Bright wrote:
>>>>> D rpm packages now available
>>>>> http://www.digitalmars.com/d/download.html thanks to Jordi Sayol.
>>>>
>>>> Also, what about hosting a yum repository?
>>>
>>> Is that the thing that allows me to insert a line in the Synaptic
>>> repositories and then benefit of integration goodies? I'd love
>>> something like that.
>>>
>>> Andrei
>>
>> Ummm.. maybe?
>>
>> Yum is a package manager built on top of rpm, essentially red hat's
>> counterpart to apt-get. I think the idea is each version of dmd as an
>> rpm lives in the yum repository, and as new versions are released, the
>> yum will semi-automatically upgrade the user's install.
>>
>> The nice thing about it is the user doesn't have to go around looking
>> for the download each time the next release of dmd comes out, although
>> they do have to initially configure their system. Typically, the
>> repository host provides a downloadable rpm which performs that action.
>>
>> I don't know that it would be particularly useful for synaptic based
>> linuxen (Andrei, see what you've got me doing?) though. Guess we'd have
>> to make a synaptic repo too.
>
>
> Synaptic supports both deb and RPM package repositories.
>
> -Lars
More precisely, Synaptic is a front end to either deb or rpm, depending on which package manager your system uses.  You still need to match the file type to the package manager type.

(I'm not really sure whether synaptic is a front end to rpm or to yum, as from the user's point of view it's the same.  I rather suspect yum, though, as when it's using deb's it's a front end to apt-get, and apt-get handles the downloading.)

June 25, 2010
On 06/25/2010 03:46 AM, Jordi Sayol i Salomó wrote:
> En/na Ellery Newcomer ha escrit:
>> On 06/24/2010 01:14 PM, Jordi Sayol i Salomó wrote:
>>> En/na Ellery Newcomer ha escrit:
>>>>
>>>> Also note that mine doesn't fail on x86_64
>>>>
>>>> (you need to add glibc-devel(x86-32) specifically as a dependency)
>>>>
>>>
>>> Can You be more explicit?
>>> I've not a 64 bit system available.
>>>
>>
>> dmd links to ctnrl.o or something like that, which is in glibc-devel
>> and must be 32 bit. If the 32 bit version ain't there, there be linker
>> errors on compile.
>>
>> in the spec file, after
>>
>> Requires: gcc
>>
>> add
>>
>> Requires: glibc-devel(x86-32)
>>
>> I know nothing of specific minimum version or anything like that, though.
>>
>
> Many thanks for Your answer.
>
> This rpm package is build for a i386 platform, and it's only installable
> on a i386 system (without force it to), so the dependencies are for i386
> installation. Of course It can be forced to install in another platform
> as x86_64, alpha, arm, hppa, mips, mipsel, powerpc, s390, sparc, etc.
> but I cannot assure that the compiler will work on all of them. You talk
> about the glibc-devel package, but this is not the only one needed by
> the compiler, dmd also needs gcc (32 bits) and in Your rpm (as in mine)
> do not specifies anything about arch, also there is a missing library on
> Your rpm, libgcc_s.so.1 is needed too by dmd.
>
> One solution for this problem is to explain the trick needed to install
> the ix86 dmd rpm package on a x86_64 system, as Walter has done with the
> same situation for the dmd deb package,
> http://www.digitalmars.com/d/2.0/dmd-linux.html#installation
>
> Another one is to create a x86_64 rpm package of dmd 32 bits compiler. I
> don't like this solution because when dmd 64 bits appears in the near
> future, this will be a source of confusion.
>
> And My preferred solution, create a i386 chroot machine inside Your
> x86_64 system, install dmd package on it and compile Yours D programs on
> it too.

Wait, isn't there a way to say in an rpm "if the target OS is 64-bit then insert this dependency, otherwise don't"?

Andrei
June 25, 2010
On 06/25/2010 03:46 AM, Jordi Sayol i Salomó wrote:
>
> Many thanks for Your answer.
>
> This rpm package is build for a i386 platform, and it's only installable
> on a i386 system (without force it to), so the dependencies are for i386
> installation. Of course It can be forced to install in another platform
> as x86_64, alpha, arm, hppa, mips, mipsel, powerpc, s390, sparc, etc.
> but I cannot assure that the compiler will work on all of them.

Well, yeah, but from personal experience I can attest that dmd works fine on x86_64 (as does, like, every other 32 bit package), and dmd works fine with 64 bit gcc. at least on my install (fedora 13 - what do you use?).

You talk
> about the glibc-devel package, but this is not the only one needed by
> the compiler, dmd also needs gcc (32 bits) and in Your rpm (as in mine)
> do not specifies anything about arch, also there is a missing library on
> Your rpm, libgcc_s.so.1 is needed too by dmd.

Really? The gcc dependency doesn't automatically bring in libgcc? Is that what the GCCVER2 business is about?

>
> One solution for this problem is to explain the trick needed to install
> the ix86 dmd rpm package on a x86_64 system, as Walter has done with the
> same situation for the dmd deb package,
> http://www.digitalmars.com/d/2.0/dmd-linux.html#installation

The trick for doing this on fedora 86_64 is just

yum install gcc glibc-devel.i686

and then putting dmd wherever. Works fine.

>
> Another one is to create a x86_64 rpm package of dmd 32 bits compiler. I
> don't like this solution because when dmd 64 bits appears in the near
> future, this will be a source of confusion.

yeah, don't do that.

>
> And My preferred solution, create a i386 chroot machine inside Your
> x86_64 system, install dmd package on it and compile Yours D programs on
> it too.

I've never found a need to do this (and I also don't know how).

>
> I apologize for my bad English.
>
> Best regards,

June 25, 2010
En/na Andrei Alexandrescu ha escrit:
> On 06/25/2010 03:46 AM, Jordi Sayol i Salomó wrote:
>> En/na Ellery Newcomer ha escrit:
>>> On 06/24/2010 01:14 PM, Jordi Sayol i Salomó wrote:
>>>> En/na Ellery Newcomer ha escrit:
>>>>>
>>>>> Also note that mine doesn't fail on x86_64
>>>>>
>>>>> (you need to add glibc-devel(x86-32) specifically as a dependency)
>>>>>
>>>>
>>>> Can You be more explicit?
>>>> I've not a 64 bit system available.
>>>>
>>>
>>> dmd links to ctnrl.o or something like that, which is in glibc-devel and must be 32 bit. If the 32 bit version ain't there, there be linker errors on compile.
>>>
>>> in the spec file, after
>>>
>>> Requires: gcc
>>>
>>> add
>>>
>>> Requires: glibc-devel(x86-32)
>>>
>>> I know nothing of specific minimum version or anything like that, though.
>>>
>>
>> Many thanks for Your answer.
>>
>> This rpm package is build for a i386 platform, and it's only installable on a i386 system (without force it to), so the dependencies are for i386 installation. Of course It can be forced to install in another platform as x86_64, alpha, arm, hppa, mips, mipsel, powerpc, s390, sparc, etc. but I cannot assure that the compiler will work on all of them. You talk about the glibc-devel package, but this is not the only one needed by the compiler, dmd also needs gcc (32 bits) and in Your rpm (as in mine) do not specifies anything about arch, also there is a missing library on Your rpm, libgcc_s.so.1 is needed too by dmd.
>>
>> One solution for this problem is to explain the trick needed to install the ix86 dmd rpm package on a x86_64 system, as Walter has done with the same situation for the dmd deb package, http://www.digitalmars.com/d/2.0/dmd-linux.html#installation
>>
>> Another one is to create a x86_64 rpm package of dmd 32 bits compiler. I don't like this solution because when dmd 64 bits appears in the near future, this will be a source of confusion.
>>
>> And My preferred solution, create a i386 chroot machine inside Your x86_64 system, install dmd package on it and compile Yours D programs on it too.
> 
> Wait, isn't there a way to say in an rpm "if the target OS is 64-bit then insert this dependency, otherwise don't"?
> 
> Andrei
> 

Until I know, there is not a direct way on rpm and deb packaging system to do that.

There is an scripting system to do what You want, but of course, You have to do all the job.

Best regards,
-- 
Jordi Sayol



June 25, 2010
En/na Ellery Newcomer ha escrit:
> On 06/25/2010 03:46 AM, Jordi Sayol i Salomó wrote:
>>
>> Many thanks for Your answer.
>>
>> This rpm package is build for a i386 platform, and it's only installable on a i386 system (without force it to), so the dependencies are for i386 installation. Of course It can be forced to install in another platform as x86_64, alpha, arm, hppa, mips, mipsel, powerpc, s390, sparc, etc. but I cannot assure that the compiler will work on all of them.
> 
> Well, yeah, but from personal experience I can attest that dmd works fine on x86_64 (as does, like, every other 32 bit package), and dmd works fine with 64 bit gcc. at least on my install (fedora 13 - what do you use?).

I use Ubuntu 9.10 i386, and there are a lot of 32 bit packages that do not works on a 64 bit system without a previous trick (installing some 32 bit library packages, etc.)

> 
> You talk
>> about the glibc-devel package, but this is not the only one needed by the compiler, dmd also needs gcc (32 bits) and in Your rpm (as in mine) do not specifies anything about arch, also there is a missing library on Your rpm, libgcc_s.so.1 is needed too by dmd.
> 
> Really? The gcc dependency doesn't automatically bring in libgcc? Is that what the GCCVER2 business is about?

Well, can You assure that in all rpm Linux systems (not only in Fedora/red-hat) everything needed will be installed?
From another point of view, if You think that the libgcc_s.so.1 will be automatically installed, Why Your rpm has these other libraries on the Requires (dependencies) tag? libc.so.6, libm.so.6 and libstdc++.so.6

> 
>>
>> One solution for this problem is to explain the trick needed to install the ix86 dmd rpm package on a x86_64 system, as Walter has done with the same situation for the dmd deb package, http://www.digitalmars.com/d/2.0/dmd-linux.html#installation
> 
> The trick for doing this on fedora 86_64 is just
> 
> yum install gcc glibc-devel.i686
> 
> and then putting dmd wherever. Works fine.

To make it easier, and if do not affects on a i386 installation, I'll change "glibc-devel" for "glibc-devel(x86-32)" on the rpm dependencies.

> 
>>
>> Another one is to create a x86_64 rpm package of dmd 32 bits compiler. I don't like this solution because when dmd 64 bits appears in the near future, this will be a source of confusion.
> 
> yeah, don't do that.

I'll not :-)

> 
>>
>> And My preferred solution, create a i386 chroot machine inside Your x86_64 system, install dmd package on it and compile Yours D programs on it too.
> 
> I've never found a need to do this (and I also don't know how).

Try it! is clean, easy and faster than other virtual machines, for text mode. I don't know how to install it in Fedora.
In Ubuntu just install "debootstrap". On Debian-like systems, chroot is used to build/compile packages for other architectures    than the host system, if it is possible.

Another thing about the creation of dmd rpm package. As You know, dmd.conf is a configuration file, and so, it can be changed by another future packages (i.e. gtkd o qtd) or by the final user. I think is not a good solution to just put it on the place, otherwise You have to make some checks during the package installation, upgrading and removing process. Check if the file exist, if not, create it, if exist, modify it to assure that dmd will properly compile, etc.

Finally, I do my best to build these packages but, of course, I make a lot of mistakes, hope you tell me what can be corrected/improved. And from my side, this is not a competition on who creates the best dmd package, I just want to have a minimal quality dmd packages to easy install/remove on my system. If You do the job, I'll be very happy to enjoy it.

Best regards,
-- 
Jordi Sayol




June 25, 2010
En/na Jordi Sayol i salomó ha escrit:
> ...
> I just want to have a minimal quality dmd packages to easy
> install/remove on my system.
> ...

Here I mean "I just want to have dmd packages with a minimum quality level..."

Sorry for that :-/

Best regards,
-- 
Jordi Sayol



June 25, 2010
On Fri, 25 Jun 2010 17:45:00 +0200, Jordi Sayol i salomó wrote:
> En/na Ellery Newcomer ha escrit:
>>> And My preferred solution, create a i386 chroot machine inside Your x86_64 system, install dmd package on it and compile Yours D programs on it too.
>> 
>> I've never found a need to do this (and I also don't know how).
> 
> Try it! is clean, easy and faster than other virtual machines, for text mode. I don't know how to install it in Fedora. In Ubuntu just install "debootstrap". On Debian-like systems, chroot is used to build/compile packages for other architectures    than the host system, if it is possible.

+1 for this. On Debian/Ubuntu systems, I find that 'schroot' makes it very easy to manage and work with chroots, including running chrooted programs from the host system.

Best,
Graham
June 25, 2010
On 06/25/2010 10:45 AM, Jordi Sayol i salomó wrote:
>
> I use Ubuntu 9.10 i386, and there are a lot of 32 bit packages that do
> not works on a 64 bit system without a previous trick (installing some
> 32 bit library packages, etc.)

But doesn't your package manager automatically take care of those dependencies?

>
> Well, can You assure that in all rpm Linux systems (not only in
> Fedora/red-hat) everything needed will be installed?
>  From another point of view, if You think that the libgcc_s.so.1 will be
> automatically installed, Why Your rpm has these other libraries on the
> Requires (dependencies) tag? libc.so.6, libm.so.6 and libstdc++.so.6

Don't know. I didn't put them there. All I have is

Requires:	glibc-devel(x86-32)
Requires:	gcc

Other stuff must have gotten added by the rpm build somehow.

>>> And My preferred solution, create a i386 chroot machine inside Your
>>> x86_64 system, install dmd package on it and compile Yours D programs on
>>> it too.
>>
>> I've never found a need to do this (and I also don't know how).
>
> Try it! is clean, easy and faster than other virtual machines, for text
> mode. I don't know how to install it in Fedora.

Does it allow different versions of your OS, or just different architectures?

More generally, what is it? :)

> In Ubuntu just install "debootstrap". On Debian-like systems, chroot is
> used to build/compile packages for other architectures than the host
> system, if it is possible.
>
> Another thing about the creation of dmd rpm package. As You know,
> dmd.conf is a configuration file, and so, it can be changed by another
> future packages (i.e. gtkd o qtd) or by the final user. I think is not a
> good solution to just put it on the place, otherwise You have to make
> some checks during the package installation, upgrading and removing
> process. Check if the file exist, if not, create it, if exist, modify it
> to assure that dmd will properly compile, etc.

How much of that does the %config directive take care of?

>
> Finally, I do my best to build these packages but, of course, I make a
> lot of mistakes, hope you tell me what can be corrected/improved. And
> from my side, this is not a competition on who creates the best dmd
> package, I just want to have a minimal quality dmd packages to easy
> install/remove on my system. If You do the job, I'll be very happy to
> enjoy it.
>
> Best regards,

June 25, 2010
Jordi Sayol i salomó wrote:

> En/na Andrei Alexandrescu ha escrit:
>> On 06/25/2010 03:46 AM, Jordi Sayol i Salomó wrote:
>>> En/na Ellery Newcomer ha escrit:
>>>> On 06/24/2010 01:14 PM, Jordi Sayol i Salomó wrote:
>>>>> En/na Ellery Newcomer ha escrit:
>>>>>>
>>>>>> Also note that mine doesn't fail on x86_64
>>>>>>
>>>>>> (you need to add glibc-devel(x86-32) specifically as a dependency)
>>>>>>
>>>>>
>>>>> Can You be more explicit?
>>>>> I've not a 64 bit system available.
>>>>>
>>>>
>>>> dmd links to ctnrl.o or something like that, which is in glibc-devel and must be 32 bit. If the 32 bit version ain't there, there be linker errors on compile.
>>>>
>>>> in the spec file, after
>>>>
>>>> Requires: gcc
>>>>
>>>> add
>>>>
>>>> Requires: glibc-devel(x86-32)
>>>>
>>>> I know nothing of specific minimum version or anything like that, though.
>>>>
>>>
>>> Many thanks for Your answer.
>>>
>>> This rpm package is build for a i386 platform, and it's only installable on a i386 system (without force it to), so the dependencies are for i386 installation. Of course It can be forced to install in another platform as x86_64, alpha, arm, hppa, mips, mipsel, powerpc, s390, sparc, etc. but I cannot assure that the compiler will work on all of them. You talk about the glibc-devel package, but this is not the only one needed by the compiler, dmd also needs gcc (32 bits) and in Your rpm (as in mine) do not specifies anything about arch, also there is a missing library on Your rpm, libgcc_s.so.1 is needed too by dmd.
>>>
>>> One solution for this problem is to explain the trick needed to install the ix86 dmd rpm package on a x86_64 system, as Walter has done with the same situation for the dmd deb package, http://www.digitalmars.com/d/2.0/dmd-linux.html#installation
>>>
>>> Another one is to create a x86_64 rpm package of dmd 32 bits compiler. I don't like this solution because when dmd 64 bits appears in the near future, this will be a source of confusion.
>>>
>>> And My preferred solution, create a i386 chroot machine inside Your x86_64 system, install dmd package on it and compile Yours D programs on it too.
>> 
>> Wait, isn't there a way to say in an rpm "if the target OS is 64-bit then insert this dependency, otherwise don't"?
>> 
>> Andrei
>> 
> 
> Until I know, there is not a direct way on rpm and deb packaging system to do that.
> 
> There is an scripting system to do what You want, but of course, You have to do all the job.
> 
> Best regards,

What about Requires: