Jump to page: 1 2 3
Thread overview
D and FreeBSD
Aug 30, 2006
Jona Joachim
Aug 30, 2006
Kyle Furlong
Aug 30, 2006
Walter Bright
Aug 31, 2006
Jona Joachim
Aug 31, 2006
Jona Joachim
Aug 31, 2006
Jona Joachim
Aug 31, 2006
Jona Joachim
Aug 31, 2006
Jona Joachim
Aug 31, 2006
Jona Joachim
Aug 30, 2006
Walter Bright
Aug 31, 2006
Jona Joachim
Aug 31, 2006
Walter Bright
Aug 31, 2006
Jona Joachim
August 30, 2006
Hi!
I'm very new to D and I appreciate it very much.
It's what C++ should have been in the first place IMHO.

I'm a FreeBSD user so I'd like to see the D programming language evolve on
this OS, too.
When I saw that wxD 0.07 was released I decided to give it a try and
ported it to FreeBSD. It wasn't really difficult.
I built it using GDC exclusively as DMD is not available in the FreeBSD
ports.
Do you think there are any concerns about building the sources with GDC
instead of DMD? All test programs seamed to work fine. The only warning I
got during the build process was:

gdc: unrecognized option `-version=__WXGTK__'

Furthermore I'd like to know if the DMD license allows me to write a
FreeBSD port of DMD which installs the Linux binary distribution and runs
it under the FreeBSD Linux compatibility layer. The port would fetch the
distfiles automatically from the Digital Mars FTP server and install them
locally.
Is this in accordance with:
"The Software is copyrighted and comes with a single user license,
and may not be redistributed. If you wish to obtain a redistribution license,
please contact Digital Mars."

If not, is it ok if the user fetches the distfiles manually and the port installs the binaries?

Do you think Digital Mars would provide FreeBSD binaries if there is enough interest from the FreeBSD users?

Best regards,
Jona
August 30, 2006
Jona Joachim wrote:
> Hi!
> I'm very new to D and I appreciate it very much.
> It's what C++ should have been in the first place IMHO.
> 
> I'm a FreeBSD user so I'd like to see the D programming language evolve on
> this OS, too.
> When I saw that wxD 0.07 was released I decided to give it a try and
> ported it to FreeBSD. It wasn't really difficult.
> I built it using GDC exclusively as DMD is not available in the FreeBSD
> ports.
> Do you think there are any concerns about building the sources with GDC
> instead of DMD? All test programs seamed to work fine. The only warning I
> got during the build process was:
> 
> gdc: unrecognized option `-version=__WXGTK__'
> 
> Furthermore I'd like to know if the DMD license allows me to write a
> FreeBSD port of DMD which installs the Linux binary distribution and runs
> it under the FreeBSD Linux compatibility layer. The port would fetch the
> distfiles automatically from the Digital Mars FTP server and install them
> locally.
> Is this in accordance with:
> "The Software is copyrighted and comes with a single user license,
> 
> and may not be redistributed. If you wish to obtain a redistribution license,
> 
> please contact Digital Mars."
> 
> If not, is it ok if the user fetches the distfiles manually and the port
> installs the binaries?
> 
> Do you think Digital Mars would provide FreeBSD binaries if there is
> enough interest from the FreeBSD users?
> 
> Best regards,
> Jona

While I don't know the legality for certain, I'm sure such an effort would be most welcome! :-D

-- 
Kyle Furlong // Physics Undergrad, UCSB

"D is going wherever the D community wants it to go." - Walter Bright
August 30, 2006
Jona Joachim wrote:

> When I saw that wxD 0.07 was released I decided to give it a try and
> ported it to FreeBSD. It wasn't really difficult.
> I built it using GDC exclusively as DMD is not available in the FreeBSD
> ports.

GDC is the preferred compiler for wxD, so that should be just fine.

> Do you think there are any concerns about building the sources with GDC
> instead of DMD? All test programs seamed to work fine. The only warning I
> got during the build process was:
> 
> gdc: unrecognized option `-version=__WXGTK__'

It should have worked out of the box, using GNU Make ? ("gmake")
Anyway, -version is the wrong syntax for gdc - it uses -fversion
So you need to either modify the above, or use "gdmd" instead...

DMD uses DMC syntax, and GDC uses GCC syntax and they're different.
gdmd -version=__WXGTK__
gdc -fversion=__WXGTK__

Wonder why it didn't include the config. `uname` == "FreeBSD", yes ?

> Furthermore I'd like to know if the DMD license allows me to write a
> FreeBSD port of DMD which installs the Linux binary distribution and runs
> it under the FreeBSD Linux compatibility layer. The port would fetch the
> distfiles automatically from the Digital Mars FTP server and install them
> locally.

We did this for the Gentoo ebuild, as long as the distfile isn't
stored anywhere it should comply with the non-distribute license ?

But Walter would know for certain.

--anders
August 30, 2006
Jona Joachim wrote:
> Do you think there are any concerns about building the sources with GDC
> instead of DMD? All test programs seamed to work fine. The only warning I
> got during the build process was:
> 
> gdc: unrecognized option `-version=__WXGTK__'

If there are any problems using GDC, please report them to the D.gnu newsgroup here or d.D.bugs.

> Furthermore I'd like to know if the DMD license allows me to write a
> FreeBSD port of DMD which installs the Linux binary distribution and runs
> it under the FreeBSD Linux compatibility layer. The port would fetch the
> distfiles automatically from the Digital Mars FTP server and install them
> locally.
> Is this in accordance with:
> "The Software is copyrighted and comes with a single user license,
> 
> and may not be redistributed. If you wish to obtain a redistribution license,
> 
> please contact Digital Mars."

Yes, it's ok.

> If not, is it ok if the user fetches the distfiles manually and the port
> installs the binaries?
> 
> Do you think Digital Mars would provide FreeBSD binaries if there is
> enough interest from the FreeBSD users?

I would, but I'm stretched pretty thin <g>.
August 30, 2006
Anders F Björklund wrote:
> We did this for the Gentoo ebuild, as long as the distfile isn't
> stored anywhere it should comply with the non-distribute license ?

That's correct.

August 30, 2006
Walter Bright wrote:

>> gdc: unrecognized option `-version=__WXGTK__'
> 
> If there are any problems using GDC, please report them to the D.gnu newsgroup here or d.D.bugs.

Also, for problems with wxD - please report at:
http://sourceforge.net/tracker/?group_id=133831

--anders
August 31, 2006
On Wed, 30 Aug 2006 11:30:36 -0700, Walter Bright wrote:

> Jona Joachim wrote:
>> Do you think there are any concerns about building the sources with GDC instead of DMD? All test programs seamed to work fine. The only warning I got during the build process was:
>> 
>> gdc: unrecognized option `-version=__WXGTK__'
> 
> If there are any problems using GDC, please report them to the D.gnu newsgroup here or d.D.bugs.
> 
>> Furthermore I'd like to know if the DMD license allows me to write a
>> FreeBSD port of DMD which installs the Linux binary distribution and runs
>> it under the FreeBSD Linux compatibility layer. The port would fetch the
>> distfiles automatically from the Digital Mars FTP server and install them
>> locally.
>> Is this in accordance with:
>> "The Software is copyrighted and comes with a single user license,
>> 
>> and may not be redistributed. If you wish to obtain a redistribution license,
>> 
>> please contact Digital Mars."
> 
> Yes, it's ok.

I missed something obvious:
The Linux version of DMD still produces Linux ELF binaries. I don't think
the FreeBSD version of ld can link Linux object files.

August 31, 2006
On Wed, 30 Aug 2006 18:21:59 +0200, Anders F Björklund wrote:

> Jona Joachim wrote:
[...]
>> Do you think there are any concerns about building the sources with GDC instead of DMD? All test programs seamed to work fine. The only warning I got during the build process was:
>> 
>> gdc: unrecognized option `-version=__WXGTK__'
> 
> It should have worked out of the box, using GNU Make ? ("gmake") Anyway, -version is the wrong syntax for gdc - it uses -fversion So you need to either modify the above, or use "gdmd" instead...

Unfortunately it doesn't work out of the box. There are always small
changes that have to be made when porting to FreeBSD.
For example FreeBSD people tend to add version numbers to executables so
that you can install multiple versions of a software in parallel.
wx-config becomes wxgtk2-2.6-config. The good part is that you don't
really have to worry about this: if you don't define the WX_CONFIG
variable it will be defined automatically by the ports framework if you
tell it that you plan to use wxWidgets.
Furthermore the FreeBSD port of gdc doesn't come with gdmd. That's why I
had to set DMD=gdc. I will change the syntax of the parameters.
Also there is no command called arch in FreeBSD so
ARCH=$(shell (arch 2>/dev/null || echo i386) | sed -e s/i.86/x86/ )
becomes
ARCH=$(shell (uname -m) | sed -e s/i.86/x86/ )
A lot of small changes like these have to be made.

> DMD uses DMC syntax, and GDC uses GCC syntax and they're different.
> gdmd -version=__WXGTK__
> gdc -fversion=__WXGTK__
> 
> Wonder why it didn't include the config. `uname` == "FreeBSD", yes ?

Yes, uname returns "FreeBSD". config.`uname` is included in the Samples directory but not in the wx directory.

Jona
August 31, 2006
Jona Joachim wrote:

>>It should have worked out of the box, using GNU Make ? ("gmake")
> 
> Unfortunately it doesn't work out of the box. There are always small
> changes that have to be made when porting to FreeBSD.

Yeah, isn't that always the case ? :-) (well, I tried my best...)
Need to get around to setting up that FreeBSD environment some day.

> For example FreeBSD people tend to add version numbers to executables so
> that you can install multiple versions of a software in parallel.
> wx-config becomes wxgtk2-2.6-config. The good part is that you don't
> really have to worry about this: if you don't define the WX_CONFIG
> variable it will be defined automatically by the ports framework if you
> tell it that you plan to use wxWidgets.

That is why I introduced the WX_CONFIG parameter, so that any platforms
that deviate from the standard wxWidgets name ("wx-config") can set it.

I have several wx configs, and wx-config is a symlink to the one I use ?

> Furthermore the FreeBSD port of gdc doesn't come with gdmd. That's why I
> had to set DMD=gdc. I will change the syntax of the parameters.

OK, so the FreeBSD port sounds broken (it should ship the gdmd wrapper)

Still, for my Makefiles to work - you should use DMD=gdmd or DC=gdc...

> Also there is no command called arch in FreeBSD so
> ARCH=$(shell (arch 2>/dev/null || echo i386) | sed -e s/i.86/x86/ )
> becomes
> ARCH=$(shell (uname -m) | sed -e s/i.86/x86/ )

Yeah, this why I did that || song-and-dance routine in the first place.
You see, `uname -m` returns "Power Macintosh" (!) here so it is useless.

I think I will go with `arch 2>/dev/null || uname -m || echo i386`

> A lot of small changes like these have to be made.

Thankful for any patches you have, I do want wxD to work on FreeBSD too.

http://sourceforge.net/tracker/?atid=729441&group_id=133831&func=browse

--anders
August 31, 2006
Jona Joachim wrote:

>>It should have worked out of the box, using GNU Make ? ("gmake")
> 
> Unfortunately it doesn't work out of the box. There are always small
> changes that have to be made when porting to FreeBSD.

It works on FreeBSD 6.1 (with upstream GDC 0.19 binary) now:
gmake MAKE=gmake WX_CONFIG=/usr/X11R6/bin/wxgtk2u-2.6-config

I will add these FreeBSD quirks to documentation for wxD 0.08,
but all samples (except the new Launcher) seem to be working ?

--anders

PS. There were some bugs with include paths to GL/gl.h etc,
    but I've filed those separately and they're all fixed...

    I used PC-BSD 1.2 (http://www.pcbsd.org) for my testing,
    if you prefer Live-CDs there's also http://freesbie.org/
« First   ‹ Prev
1 2 3