the language machine on Mac OS X 10.4 - LMachine.xcodeproj.zip (1/1)

Peri Hankey mpah at thegreen.co.uk
Mon Feb 20 13:28:31 PST 2006


Me wrote:
> In article <dtc54c$1e7j$1 at digitaldaemon.com>,
>  Peri Hankey <mpah at thegreen.co.uk> wrote:
> 
> 
>>ar cru lib/.libs/liblm.a
> 
> ...
> 
>>>The synopsis of ar differs between gnu and apple version.
>>
>>I'll have to find out how to deal with this - should be handled by 
>>autoconf etc presumably.
>>
>>
>>>Anyway what ar is supposed to do?
>>
>>ar combines object files in a library ar-chive.
> 
> yes, but it's called without input files

Maybe because the -shared flag didn't work, so no .so files, so 
apparently called without any input files?

> 
>>>And why do you put the libraries in an hidden directory?
>>
>>I hacked some existing build scripts which worked this way. You can do a 
>>local non-root build and install as follows:
>>
>>WHERE_TO_INSTALL=full-path-to-somewhere-you-can-write-to
>>cd the-directory-that-was-unpacked-from-the-tarball
>>./configure --prefix=$WHERE_TO_INSTALL; make install
>>
> 
> Good.
> 
>>>The good news are getting a working copy of lm is simple:
>>>compile all sources and then link the right pieces.
>>>Note: Working means executes fpCalc.
>>
>>Great - but presumably these are statically linked? It looks as if I 
>>need to provide an option for static linking.
>>
>>Thanks again.
>>Peri
> 
> 
> Those were statically linked but today I made also a dynamically linked 
> version:

Aha! looks useful.

> 
> compiled using
> 
> gdc -fversion=Posix -fversion=darwin -fbounds-check 
> -femit-templates=auto -Isrc -O3 -c -o $something.o $something.d
>    
>    I think options before -Isrc are not needed, but I did not test
> 
> linked using
> 
> gdc -o $somewhere/liblm.dylib -L/usr/lib/gcc40 $files_to_link -arch ppc 
> -Wl,-single_module -compatibility_version 1 -current_version 1 
> -install_name /usr/local/lib/liblm.dylib -dynamiclib
> 
>    for liblm.dylib
>    -install_name is where dyld looks for the library that is where it 
> must be installed
> 
> libtool -static -arch_only ppc -o $somewhere/liblmtcc.a -L/usr/lib/gcc40 
> $files_to_link
> 
>    for liblmtcc.a [not a dynamic library]
>    libtool is in the standard tool of the AppleDeveloperTools, not the 
> script but probably both call ar and ranlib
> 
> gdc -o $tool_name -llm -arch ppc $files_to_link
> 
>    for lm lmn2_
>    you'll get "warning multiple definitions of symbol __Dmain" but works.
> 
> 
> important things are
>  -O3 building else stops compiling lmb.d with strange assemler errors 
> caused by line 15 (I suppose)
>  -L/usr/lib/gcc40 else fails because doesn't find libgcc_s
> 

More to look into :(

> 
> I made also an Xcode project see attachments but requires a proper 
> configuration of the Xcode IDE to use GDC. I used GNUDCompiler.xcplugin 
> but other solutions may work.

Had you seen this?

     http://www.alanz.com/d/xcode/

I came across it this morning - might be useful?

> To use it just put it in 
> the-directory-that-was-unpacked-from-the-tarball.
> Enjoy
> 

Thanks again
Peri

-- 
Peri Hankey        mpah at thegreen.co.uk        +44-1865-300740
http://languagemachine.sourceforge.net - The language machine



More information about the D.gnu mailing list