Compiling R8B under OS X

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling R8B under OS X

Sean Hinde-3
Hi,

I have made some little progress in compiling R8B on my G4 Mac..
changing the lines around 1712 of sys/unix/sys.c to read:

> /* Interface function available to driver writers */
> int driver_select(this_port, fd, mode, on)
> ErlDrvPort this_port;
> ErlDrvEvent fd;
> int mode, on;
> {

gets beam to compile, but I bomb out at:

> cc -g -O2
> -I/Users/sean/Desktop/otp_src_R8B-0/erts/powerpc-apple-darwin1.4  
> -no-cpp-precomp  -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H    
> -DUSE_DNS -DEPMD_PORT=4369 -c erl_malloc.c -o
> /Users/sean/Desktop/otp_src_R8B-0/lib/erl_interface/obj/powerpc-apple-darwin1.
> 4/erl_malloc.o
> /var/tmp/ccIXdaaa.s:278:Expected comma after segment-name
> /var/tmp/ccIXdaaa.s:278:Rest of line ignored. 1st junk character valued
> 46 (.).
> /var/tmp/ccIXdaaa.s:278:Spurious digit 0.
> /var/tmp/ccIXdaaa.s:278:Spurious digit 6.
> /var/tmp/ccIXdaaa.s:278:Rest of line ignored. 1st junk character valued
> 57 (9).
> /var/tmp/ccIXdaaa.s:278:Junk character 40 (().
> /var/tmp/ccIXdaaa.s:278:Rest of line ignored. 1st junk character valued
> 48 (0).
> make[4]: ***
> [/Users/sean/Desktop/otp_src_R8B-0/lib/erl_interface/obj/powerpc-apple-darwin1.
> 4/erl_malloc.o] Error 1
> make[3]: *** [opt] Error 2
> make[2]: *** [opt] Error 2
> make[1]: *** [opt] Error 2
> make: *** [libs] Error 2

This is way too heavy for me!

Any suggestions anyone?

Sean



Reply | Threaded
Open this post in threaded view
|

Compiling R8B under OS X

Kent Boortz-2

I have just built R8B on Mac OS X 10.1. I haven't run any test cases
just manage to get a prompt. I don't have time to do any testing on
Mac OS X at the moment.

I went the "easy way" making the linking work as in Mac OS X 10.0. I
don't understand "framework", "bundle" or other Mac OS X concepts and
I don't understand the new "two-level namespace" concept used in Mac
OS X 10.1. Maybe someone else can supply a patch that does linking and
loading of linked in drivers "the Mac OS X way".

  http://developer.apple.com/techpubs/macosx/ReleaseNotes/TwoLevelNamespaces.html

I have included an unofficial patch below. It will take a week or two
before we have completed the corrections we want to go into the R8B-1
source release.

Make sure you read the updated README before you begin to build,

kent

-------------- next part --------------
A non-text attachment was scrubbed...
Name: osx.patch
Type: application/octet-stream
Size: 2344 bytes
Desc: Mac OS X 10.1 unofficial patch
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20011203/a4697698/attachment.obj>

Reply | Threaded
Open this post in threaded view
|

Compiling R8B under OS X

Sean Hinde-3
Excellent, thanks Kent.

> I have just built R8B on Mac OS X 10.1. I haven't run any test cases
> just manage to get a prompt. I don't have time to do any testing on
> Mac OS X at the moment.

Well, wings3d works great (after dealing with flat_namespace and
grabbing an old version of libsdl (1.2.1) out of their cvs archive.

> I went the "easy way" making the linking work as in Mac OS X 10.0. I
> don't understand "framework", "bundle" or other Mac OS X concepts and
> I don't understand the new "two-level namespace" concept used in Mac
> OS X 10.1. Maybe someone else can supply a patch that does linking and
> loading of linked in drivers "the Mac OS X way".

Yes, it's pretty darn strange. Especially that there are two entirely
different types of shared library - some you link to using -l and others
with -framework. Wow.

One question - the nature of the errors in sys.c suggests that that code
is not used by any other platform - is it really a case of fixing this
code or do you suspect there might be a configure problem?

Thanks again,

Sean



Reply | Threaded
Open this post in threaded view
|

Compiling R8B under OS X

Kent Boortz-2

Sean Hinde <earlyriser> writes:
> Well, wings3d works great (after dealing with flat_namespace and
> grabbing an old version of libsdl (1.2.1) out of their cvs archive.

Wings3D makes Erlang on OS X a bit more important than it used to be ;-)

> One question - the nature of the errors in sys.c suggests that that code
> is not used by any other platform - is it really a case of fixing this
> code or do you suspect there might be a configure problem?

I don't quite understand what you mean. Mac OS X is the only Unix
platform we have here that has no poll() function and then sets
USE_SELECT (this is one reason we like to have OS X part of our daily
build). That we didn't test often enough with Mac OS X was the reason
we didn't find this problem before the release.

The configure script was changed to use poll() if available. I don't
know the reason for this but I suspect there is no way of knowing what
the "preferred" network API is when an OS has both poll() and
select().

kent