View mode: basic / threaded / horizontal-split · Log in · Help
February 15, 2009
Re: Just one more thing...
Extrawurst wrote:
> Walter Bright wrote:
>> Now includes Mac OSX version!
>>
>> http://www.digitalmars.com/d/1.0/changelog.html
>> http://ftp.digitalmars.com/dmd.1.040.zip
>>
>>
>> http://www.digitalmars.com/d/2.0/changelog.html
>> http://ftp.digitalmars.com/dmd.2.025.zip
>>
>> Expect bugs. Thread local storage isn't working on OSX, neither are
>> sockets and memory mapped files (for unknown reasons).
>>
>> Thanks to Sean Kelly for a lot of help on the runtime library with this.
>
> Very nice, but what happened to version 2.024 ?

Market inflation ;-)
February 15, 2009
Re: Just one more thing...
Walter Bright wrote:
> Now includes Mac OSX version!
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.040.zip
> 
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.025.zip
> 
> Expect bugs. Thread local storage isn't working on OSX, neither are 
> sockets and memory mapped files (for unknown reasons).
> 
> Thanks to Sean Kelly for a lot of help on the runtime library with this.


Would you please fix bug #2479. Haven't been able to use any release 
since 2.021.

The problem is the variable arguments as used in sformat (where there is 
an addition argument to the vararg list)

import std.stdio;
import std.string;

void main()
{
    char [32]msg;

    sformat(msg,"%s","Hello");
    writefln(msg);
}
February 15, 2009
Re: Just one more thing...
Michel Fortin wrote:
>> Is 10.5 really binary incompatible with 10.4 ?
> 
> It is compatible, unless you're using a new API or new linker features 
> which weren't available in 10.4.
> 
> Development on Mac OS X works by choosing a target SDK and a deployment 
> target version. Unless you want to use new APIs from 10.5, you should 
> use the MacOSX10.4u.sdk SDK. Here's some documentation about how to do 
> that:
> 
> <http://developer.apple.com/documentation/developertools/conceptual/cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB> 
> 
> 
> If
> you use the 10.5 SDK, or no SDK at all, then the new APIs from 10.5 are 
> available and if your software links to some of that it won't be 
> possible to run it on 10.4. You can set the (minimum) deployment target 
> to 10.4 if you want: this will cause functions from 10.5 to be 
> weak-linked, and then you can check at runtime if they're available and 
> not use them if they're not. But if you don't need anything specific to 
> 10.5, you should just use the 10.4 SDK and then you'll be pretty sure it 
> runs correctly there.

It's hard to see what that might be. dmd uses nothing but the generic 
linker commands, in fact, it uses gcc to do the link. It also doesn't 
use any but the basic api functions like read() and write().
February 15, 2009
Re: Just one more thing...
On Sun, Feb 15, 2009 at 05:06, Walter Bright <newshound1@digitalmars.com> wrote:
> It's hard to see what that might be. dmd uses nothing but the generic linker
> commands, in fact, it uses gcc to do the link. It also doesn't use any but
> the basic api functions like read() and write().
>

When you link you have to have an environment variable set,
MACOSX_DEPLOYMENT_TARGET=10.4. There's probably some other things that
need to be done, if you use Xcode to build it'll do it for you easily.

-- 
Anders Bergh
February 15, 2009
Re: Just one more thing...
Anders Bergh wrote:
> On Sun, Feb 15, 2009 at 05:06, Walter Bright <newshound1@digitalmars.com> wrote:
>> It's hard to see what that might be. dmd uses nothing but the generic linker
>> commands, in fact, it uses gcc to do the link. It also doesn't use any but
>> the basic api functions like read() and write().
>>
> 
> When you link you have to have an environment variable set,
> MACOSX_DEPLOYMENT_TARGET=10.4. There's probably some other things that
> need to be done, if you use Xcode to build it'll do it for you easily.
> 

I don't use XCODE, just an ordinary makefile. What else needs to be done?
February 15, 2009
Re: Just one more thing...
On Sun, Feb 15, 2009 at 06:04, Walter Bright <newshound1@digitalmars.com> wrote:
> Anders Bergh wrote:
>>
>> On Sun, Feb 15, 2009 at 05:06, Walter Bright <newshound1@digitalmars.com>
>> wrote:
>>>
>>> It's hard to see what that might be. dmd uses nothing but the generic
>>> linker
>>> commands, in fact, it uses gcc to do the link. It also doesn't use any
>>> but
>>> the basic api functions like read() and write().
>>>
>>
>> When you link you have to have an environment variable set,
>> MACOSX_DEPLOYMENT_TARGET=10.4. There's probably some other things that
>> need to be done, if you use Xcode to build it'll do it for you easily.
>>
>
> I don't use XCODE, just an ordinary makefile. What else needs to be done?
>

A few Google searches gives me this:

http://paulbeachsblog.blogspot.com/2007/12/i-have-read-in-number-of-places-that-i.html
(suggests -mmacosx-version-min=10.4)

Also, -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk

I don't use 10.4 so I have no way of testing it.

-- 
Anders Bergh
February 15, 2009
Re: Just one more thing...
Anders Bergh wrote:
> On Sun, Feb 15, 2009 at 06:04, Walter Bright <newshound1@digitalmars.com> wrote:
>> Anders Bergh wrote:
>>> On Sun, Feb 15, 2009 at 05:06, Walter Bright <newshound1@digitalmars.com>
>>> wrote:
>>>> It's hard to see what that might be. dmd uses nothing but the generic
>>>> linker
>>>> commands, in fact, it uses gcc to do the link. It also doesn't use any
>>>> but
>>>> the basic api functions like read() and write().
>>>>
>>> When you link you have to have an environment variable set,
>>> MACOSX_DEPLOYMENT_TARGET=10.4. There's probably some other things that
>>> need to be done, if you use Xcode to build it'll do it for you easily.
>>>
>> I don't use XCODE, just an ordinary makefile. What else needs to be done?
>>
> 
> A few Google searches gives me this:
> 
> http://paulbeachsblog.blogspot.com/2007/12/i-have-read-in-number-of-places-that-i.html
> (suggests -mmacosx-version-min=10.4)

From the article: "Any attempt to compile Firebird on MacOS 10.5 and 
run it on MacOS 10.4 will create bus errors."

I suppose that explains the bus error. But I love this: "The Firebird 
build environment now uses both - just to make 100% certain". Blech. 
Anyone know for sure? I hate randomly trying things.
February 15, 2009
Re: Just one more thing...
Walter Bright wrote:
> I suppose that explains the bus error. But I love this: "The Firebird 
> build environment now uses both - just to make 100% certain". Blech. 
> Anyone know for sure? I hate randomly trying things.

Set both of them... They're for the same thing, but as with all
deprecation processes it's not 100% sure everything is migrated.

MACOSX_DEPLOYMENT_TARGET=10.4
CFLAGS+=-isysroot /Developer/SDKs/MacOSX10.4u.sdk

Specifically, you want gcc and linker to use the same settings.
(especially to pick the correct OS version of the crt1 library)

But according to the documentation, this "should" work instead:
-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk

--anders

PS.
I *think* it's fixed in Xcode 3.1.2, but I wouldn't bet on it...
If you're using Xcode 3.0 (from DVD), you should probably upgrade.
February 15, 2009
Re: Just one more thing...
Walter Bright wrote:

>> I gather this only works with Mac OS X 10.5 "Leopard" ?
>>
>> $ dmd/osx/bin/dmd hello.d
>> Bus error
>>
>> Could it be rebuilt with the MacOSX10.4u.sdk, perhaps ?
> 
> It works with whatever came with the Mac mini install disk <g>. I have 
> no idea about other setups.

It works on Mac OS X 10.5 (confirmed with "hello.d"):
$ dmd/osx/bin/dmd dmd/samples/d/hello.d

However, "dmd" is not executable (chmod +x dmd) and
"dmd.conf" is missing (copy from "linux" directory) ?

--anders

PS. I made an installer for it with PackageMaker.app,
similar to the ones for Windows and Linux made earlier.
http://www.algonet.se/~afb/d/dmd-setup.html (DMD 1.00)
http://www.algonet.se/~afb/d/rpm-setup.html (DMD 1.00)
February 15, 2009
Re: Just one more thing...
Anders F Björklund wrote:
> Walter Bright wrote:
>> I suppose that explains the bus error. But I love this: "The Firebird 
>> build environment now uses both - just to make 100% certain". Blech. 
>> Anyone know for sure? I hate randomly trying things.
> 
> Set both of them... They're for the same thing, but as with all
> deprecation processes it's not 100% sure everything is migrated.
> 
> MACOSX_DEPLOYMENT_TARGET=10.4
> CFLAGS+=-isysroot /Developer/SDKs/MacOSX10.4u.sdk
> 
> Specifically, you want gcc and linker to use the same settings.
> (especially to pick the correct OS version of the crt1 library)
> 
> But according to the documentation, this "should" work instead:
> -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> 
> --anders
> 
> PS.
> I *think* it's fixed in Xcode 3.1.2, but I wouldn't bet on it...
> If you're using Xcode 3.0 (from DVD), you should probably upgrade.

Hmm. I tried compiling programs by just adding -mmacosx-version-min=10.4 
 and the compiled executable is a different size, and still runs.
1 2 3 4 5 6
Top | Discussion index | About this forum | D home