Alexander Syed | 23 May 2012 01:14
Picon

mod_neko2 with Apache 2.2.1 on Os X 10.6

Hi,

so, I'm still trying to get mod_neko2 running with my Apache installation.

With the prebuilt neko-1.8.2-osx binaries I was getting this error.

httpd: Syntax error on line 118 of /opt/local/apache2/conf/httpd.conf: Cannot load /Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll into server: dlopen(/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll, 10): no suitable image found.  Did find:\n\t/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll: mach-o, but wrong architecture


With my own binaries built today from trunk r1882
I am getting this error.

Cannot load /Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll into server: dlopen(/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll, 10): no suitable image found.  Did find:\n\t/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll: no matching architecture in universal wrapper


My apache is:

httpd -V
Server version: Apache/2.2.21 (Unix)
Server built:   Dec  5 2011 20:56:38
Server loaded:  APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)


The error I described earlier  (zlib) ...
../bin/neko nekoml -nostd neko/Main.nml nekoml/Main.nml core/*.nml -pack ../bin/nekoml.std
dyld: lazy symbol binding failed: Symbol not found: _deflateInit_
Referenced from: /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
Expected in: dynamic lookup

dyld: Symbol not found: _deflateInit_
Referenced from: /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
Expected in: dynamic lookup

Called from tools/install.neko line 411
Uncaught exception - Error 5 : aborted
make: *** [libs] Error 1

.......was while trying to build with these settings in the Makefile

# For OSX
#
MACOSX = 1

# For OSX Universal Binaries
#
# OSX_UNIVERSAL = 1


# For 64 bit
#
CFLAGS += -D_64BITS

i.e.  Not the universal binaries.



I then did get the build working by un-commenting

OSX_UNIVERSAL = 1 

but as stated earlier the mod_neko2 that built still does not play nice with my macports apache.

My next plan is to move over to homebrew package manager and see if that fairs any better. I also suspect that my PATH is total mayhem and may have stuff on it that is not helping.

Anyone who has managed to build a mod_neko2 that works on OS X  (64 bit apache) - please speak up ! :)
I'm far from a make / configure  expert so any tips are welcome.

A.
--

-- 
Neko : One VM to run them all
(http://nekovm.org)
Nicolas Cannasse | 23 May 2012 11:17
Favicon
Gravatar

Re: mod_neko2 with Apache 2.2.1 on Os X 10.6

Le 23/05/2012 01:14, Alexander Syed a écrit :
> Hi,
>
> so, I'm still trying to get mod_neko2 running with my Apache installation.
>
> With the prebuilt neko-1.8.2-osx binaries I was getting this error.
>
> httpd: Syntax error on line 118 of /opt/local/apache2/conf/httpd.conf:
> Cannot load /Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll into server:
> dlopen(/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll, 10): no suitable
> image found. Did
> find:\n\t/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll: mach-o, but
> wrong architecture
>
>
> With my own binaries built today from trunk r1882
> I am getting this error.
>
> Cannot load
> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll into
> server:
> dlopen(/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll,
> 10): no suitable image found. Did
> find:\n\t/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll:
> no matching architecture in universal wrapper
>
>
> My apache is:
>
> httpd -V
> Server version: Apache/2.2.21 (Unix)
> Server built: Dec 5 2011 20:56:38
> Server loaded: APR 1.3.8, APR-Util 1.3.9
> Compiled using: APR 1.3.8, APR-Util 1.3.9
> Architecture: 64-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
>
>
> The error I described earlier (zlib) ...
> ../bin/neko nekoml -nostd neko/Main.nml nekoml/Main.nml core/*.nml -pack
> ../bin/nekoml.std
> dyld: lazy symbol binding failed: Symbol not found: _deflateInit_
> Referenced from:
> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
> Expected in: dynamic lookup
>
> dyld: Symbol not found: _deflateInit_
> Referenced from:
> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
> Expected in: dynamic lookup
>
> Called from tools/install.neko line 411
> Uncaught exception - Error 5 : aborted
> make: *** [libs] Error 1
>
> .......was while trying to build with these settings in the Makefile
>
> # For OSX
> #
> MACOSX = 1
>
> # For OSX Universal Binaries
> #
> # OSX_UNIVERSAL = 1
>
>
> # For 64 bit
> #
> CFLAGS += -D_64BITS
>
> i.e. Not the universal binaries.
>
>
>
> I then did get the build working by un-commenting
>
> OSX_UNIVERSAL = 1
>
> but as stated earlier the mod_neko2 that built still does not play nice
> with my macports apache.

Could you try to disable again OSX_UNIVERAL=1, and update latest SVN 
install.neko ? I disabled static linking of zlib on 64 bits systems, 
which might be your actual issue.

Best,
Nicolas

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Alexander Syed | 23 May 2012 21:14
Picon

Re: mod_neko2 with Apache 2.2.1 on Os X 10.6

Thanks,

I tried with r1883, I got this error:

(cd src; LD_LIBRARY_PATH=../bin:/opt/local/lib: NEKOPATH=../boot:../bin 
../bin/neko nekoc tools/install.neko)
tools/install.neko(124): Unexpected !
make: *** [libs] Error 255

So in fact I edited install.neko and changed

if( system == "Mac" && !is64 )

to

if( system == "Mac" && is64==false )

- so now the 64 bit non universal version builds for the first time for me.

but I am still one step away from running mod_neko2

Apache now says -

Cannot load /Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll into 
server: dlopen(/Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll, 
10): Library not loaded:  <at> executable_path/libneko.dylib\n  Referenced 
from: /Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll\n  Reason: 
image not found

But I think I can fix this by making sure Apache can find libneko.dylib 
right ? add to  DYLD_LIBRARY_PATH ?

Many Thanks,
Alex.

On 23/05/2012 10:17, Nicolas Cannasse wrote:
> Le 23/05/2012 01:14, Alexander Syed a écrit :
>> Hi,
>>
>> so, I'm still trying to get mod_neko2 running with my Apache 
>> installation.
>>
>> With the prebuilt neko-1.8.2-osx binaries I was getting this error.
>>
>> httpd: Syntax error on line 118 of /opt/local/apache2/conf/httpd.conf:
>> Cannot load /Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll into server:
>> dlopen(/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll, 10): no suitable
>> image found. Did
>> find:\n\t/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll: mach-o, but
>> wrong architecture
>>
>>
>> With my own binaries built today from trunk r1882
>> I am getting this error.
>>
>> Cannot load
>> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll into
>> server:
>> dlopen(/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll,
>> 10): no suitable image found. Did
>> find:\n\t/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll: 
>>
>> no matching architecture in universal wrapper
>>
>>
>> My apache is:
>>
>> httpd -V
>> Server version: Apache/2.2.21 (Unix)
>> Server built: Dec 5 2011 20:56:38
>> Server loaded: APR 1.3.8, APR-Util 1.3.9
>> Compiled using: APR 1.3.8, APR-Util 1.3.9
>> Architecture: 64-bit
>> Server MPM: Prefork
>> threaded: no
>> forked: yes (variable process count)
>>
>>
>> The error I described earlier (zlib) ...
>> ../bin/neko nekoml -nostd neko/Main.nml nekoml/Main.nml core/*.nml -pack
>> ../bin/nekoml.std
>> dyld: lazy symbol binding failed: Symbol not found: _deflateInit_
>> Referenced from:
>> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
>> Expected in: dynamic lookup
>>
>> dyld: Symbol not found: _deflateInit_
>> Referenced from:
>> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
>> Expected in: dynamic lookup
>>
>> Called from tools/install.neko line 411
>> Uncaught exception - Error 5 : aborted
>> make: *** [libs] Error 1
>>
>> .......was while trying to build with these settings in the Makefile
>>
>> # For OSX
>> #
>> MACOSX = 1
>>
>> # For OSX Universal Binaries
>> #
>> # OSX_UNIVERSAL = 1
>>
>>
>> # For 64 bit
>> #
>> CFLAGS += -D_64BITS
>>
>> i.e. Not the universal binaries.
>>
>>
>>
>> I then did get the build working by un-commenting
>>
>> OSX_UNIVERSAL = 1
>>
>> but as stated earlier the mod_neko2 that built still does not play nice
>> with my macports apache.
>
> Could you try to disable again OSX_UNIVERAL=1, and update latest SVN 
> install.neko ? I disabled static linking of zlib on 64 bits systems, 
> which might be your actual issue.
>
> Best,
> Nicolas
>

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Alexander Syed | 23 May 2012 22:07
Picon

Fwd: Re: mod_neko2 with Apache 2.2.1 on Os X 10.6

Got a little further....

Here's where I'm at - I copied the binaries to /usr/local/lib/neko
I created a symlink
ln -s /usr/local/lib/neko/libneko.dylib  /usr/lib/libneko.dylib

Apache gave same error as before

Library not loaded:  <at> executable_path/libneko.dylib\n  ....

I created another symlink too
ln -s /usr/local/lib/neko/libneko.dylib  /opt/lib/libneko.dylib

Now the error is

Can't locate API module structure `mod_neko' in file 
/usr/local/lib/neko/mod_neko2.ndll: dlsym(0x100404db0, mod_neko): symbol 
not found

While the errors are changing it means I'm making progress :)
Thanks for the help.

Thanks,

I tried with r1883, I got this error:

(cd src; LD_LIBRARY_PATH=../bin:/opt/local/lib: NEKOPATH=../boot:../bin
../bin/neko nekoc tools/install.neko)
tools/install.neko(124): Unexpected !
make: *** [libs] Error 255

So in fact I edited install.neko and changed

if( system == "Mac"&&  !is64 )

to

if( system == "Mac"&&  is64==false )

- so now the 64 bit non universal version builds for the first time for me.

but I am still one step away from running mod_neko2

Apache now says -

Cannot load /Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll into
server: dlopen(/Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll,
10): Library not loaded:  <at> executable_path/libneko.dylib\n  Referenced
from: /Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll\n  Reason:
image not found

But I think I can fix this by making sure Apache can find libneko.dylib
right ? add to  DYLD_LIBRARY_PATH ?

Many Thanks,
Alex.

On 23/05/2012 10:17, Nicolas Cannasse wrote:
>  Le 23/05/2012 01:14, Alexander Syed a écrit :
>>  Hi,
>>
>>  so, I'm still trying to get mod_neko2 running with my Apache
>>  installation.
>>
>>  With the prebuilt neko-1.8.2-osx binaries I was getting this error.
>>
>>  httpd: Syntax error on line 118 of /opt/local/apache2/conf/httpd.conf:
>>  Cannot load /Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll into server:
>>  dlopen(/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll, 10): no suitable
>>  image found. Did
>>  find:\n\t/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll: mach-o, but
>>  wrong architecture
>>
>>
>>  With my own binaries built today from trunk r1882
>>  I am getting this error.
>>
>>  Cannot load
>>  /Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll into
>>  server:
>>  dlopen(/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll,
>>  10): no suitable image found. Did
>>  find:\n\t/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll:
>>
>>  no matching architecture in universal wrapper
>>
>>
>>  My apache is:
>>
>>  httpd -V
>>  Server version: Apache/2.2.21 (Unix)
>>  Server built: Dec 5 2011 20:56:38
>>  Server loaded: APR 1.3.8, APR-Util 1.3.9
>>  Compiled using: APR 1.3.8, APR-Util 1.3.9
>>  Architecture: 64-bit
>>  Server MPM: Prefork
>>  threaded: no
>>  forked: yes (variable process count)
>>
>>
>>  The error I described earlier (zlib) ...
>>  ../bin/neko nekoml -nostd neko/Main.nml nekoml/Main.nml core/*.nml -pack
>>  ../bin/nekoml.std
>>  dyld: lazy symbol binding failed: Symbol not found: _deflateInit_
>>  Referenced from:
>>  /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
>>  Expected in: dynamic lookup
>>
>>  dyld: Symbol not found: _deflateInit_
>>  Referenced from:
>>  /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll
>>  Expected in: dynamic lookup
>>
>>  Called from tools/install.neko line 411
>>  Uncaught exception - Error 5 : aborted
>>  make: *** [libs] Error 1
>>
>>  .......was while trying to build with these settings in the Makefile
>>
>>  # For OSX
>>  #
>>  MACOSX = 1
>>
>>  # For OSX Universal Binaries
>>  #
>>  # OSX_UNIVERSAL = 1
>>
>>
>>  # For 64 bit
>>  #
>>  CFLAGS += -D_64BITS
>>
>>  i.e. Not the universal binaries.
>>
>>
>>
>>  I then did get the build working by un-commenting
>>
>>  OSX_UNIVERSAL = 1
>>
>>  but as stated earlier the mod_neko2 that built still does not play nice
>>  with my macports apache.
>
>  Could you try to disable again OSX_UNIVERAL=1, and update latest SVN
>  install.neko ? I disabled static linking of zlib on 64 bits systems,
>  which might be your actual issue.
>
>  Best,
>  Nicolas
>

--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Alexander Syed | 23 May 2012 23:38
Picon

Re: mod_neko2 with Apache 2.2.1 on Os X 10.6

ok - got it working !

First I want to correct one statement from the last mail because it seems an important step with the macports apache installation
I said ..
ln -s /usr/local/lib/neko/libneko.dylib /opt/lib/libneko.dylib In fact I meant to say this
ln -s /usr/local/lib/neko/libneko.dylib /opt/local/lib/libneko.dylib
Not sure why but this seems to be the only way that the macports apache installation can see can see it.

The final error I was reporting was just plain stupidity on my part. . .
I was doing,
LoadModule mod_neko /usr/local/lib/neko/mod_neko2.ndll
Instead of
LoadModule neko_module /usr/local/lib/neko/mod_neko2.ndll

Anyway I'll give it a quick test now with some .n files and let you know what happened.


A.

-------- Original Message -------- From: X-Mozilla-Status: X-Mozilla-Status2: X-Mozilla-Keys: Message-ID: Date: From: User-Agent: MIME-Version: To: Subject: References: In-Reply-To: X-Forwarded-Message-Id: Content-Type: Content-Transfer-Encoding:
- Wed May 23 21:08:00 2012
0001
00800000

<4FBD439D.6020705 <at> gmail.com>
Wed, 23 May 2012 21:07:57 +0100
Alexander Syed <alexksyed <at> gmail.com>
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
1.0
Neko intermediate language mailing list <neko <at> lists.motion-twin.com>
Fwd: Re: [Neko] mod_neko2 with Apache 2.2.1 on Os X 10.6
<4FBD372A.10503 <at> gmail.com>
<4FBD372A.10503 <at> gmail.com>
<4FBD372A.10503 <at> gmail.com>
text/plain; charset=ISO-8859-1; format=flowed
8bit


Got a little further.... Here's where I'm at - I copied the binaries to /usr/local/lib/neko I created a symlink ln -s /usr/local/lib/neko/libneko.dylib /usr/lib/libneko.dylib Apache gave same error as before Library not loaded: <at> executable_path/libneko.dylib\n .... I created another symlink too ln -s /usr/local/lib/neko/libneko.dylib /opt/lib/libneko.dylib Now the error is Can't locate API module structure `mod_neko' in file /usr/local/lib/neko/mod_neko2.ndll: dlsym(0x100404db0, mod_neko): symbol not found While the errors are changing it means I'm making progress :) Thanks for the help. Thanks, I tried with r1883, I got this error: (cd src; LD_LIBRARY_PATH=../bin:/opt/local/lib: NEKOPATH=../boot:../bin ../bin/neko nekoc tools/install.neko) tools/install.neko(124): Unexpected ! make: *** [libs] Error 255 So in fact I edited install.neko and changed if( system == "Mac"&& !is64 ) to if( system == "Mac"&& is64==false ) - so now the 64 bit non universal version builds for the first time for me. but I am still one step away from running mod_neko2 Apache now says - Cannot load /Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll into server: dlopen(/Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll, 10): Library not loaded: <at> executable_path/libneko.dylib\n Referenced from: /Users/a/dev/workspaces/neko/nekovm/bin/mod_neko2.ndll\n Reason: image not found But I think I can fix this by making sure Apache can find libneko.dylib right ? add to DYLD_LIBRARY_PATH ? Many Thanks, Alex. On 23/05/2012 10:17, Nicolas Cannasse wrote: > Le 23/05/2012 01:14, Alexander Syed a écrit : >> Hi, >> >> so, I'm still trying to get mod_neko2 running with my Apache >> installation. >> >> With the prebuilt neko-1.8.2-osx binaries I was getting this error. >> >> httpd: Syntax error on line 118 of /opt/local/apache2/conf/httpd.conf: >> Cannot load /Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll into server: >> dlopen(/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll, 10): no suitable >> image found. Did >> find:\n\t/Users/a/dev/bin/neko-1.8.2-osx/mod_neko2.ndll: mach-o, but >> wrong architecture >> >> >> With my own binaries built today from trunk r1882 >> I am getting this error. >> >> Cannot load >> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll into >> server: >> dlopen(/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll, >> 10): no suitable image found. Did >> find:\n\t/Users/a/dev/workspaces/neko/nekovm-read-only/bin/mod_neko2.ndll: >> >> no matching architecture in universal wrapper >> >> >> My apache is: >> >> httpd -V >> Server version: Apache/2.2.21 (Unix) >> Server built: Dec 5 2011 20:56:38 >> Server loaded: APR 1.3.8, APR-Util 1.3.9 >> Compiled using: APR 1.3.8, APR-Util 1.3.9 >> Architecture: 64-bit >> Server MPM: Prefork >> threaded: no >> forked: yes (variable process count) >> >> >> The error I described earlier (zlib) ... >> ../bin/neko nekoml -nostd neko/Main.nml nekoml/Main.nml core/*.nml -pack >> ../bin/nekoml.std >> dyld: lazy symbol binding failed: Symbol not found: _deflateInit_ >> Referenced from: >> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll >> Expected in: dynamic lookup >> >> dyld: Symbol not found: _deflateInit_ >> Referenced from: >> /Users/a/dev/workspaces/neko/nekovm-read-only/bin/zlib.ndll >> Expected in: dynamic lookup >> >> Called from tools/install.neko line 411 >> Uncaught exception - Error 5 : aborted >> make: *** [libs] Error 1 >> >> .......was while trying to build with these settings in the Makefile >> >> # For OSX >> # >> MACOSX = 1 >> >> # For OSX Universal Binaries >> # >> # OSX_UNIVERSAL = 1 >> >> >> # For 64 bit >> # >> CFLAGS += -D_64BITS >> >> i.e. Not the universal binaries. >> >> >> >> I then did get the build working by un-commenting >> >> OSX_UNIVERSAL = 1 >> >> but as stated earlier the mod_neko2 that built still does not play nice >> with my macports apache. > > Could you try to disable again OSX_UNIVERAL=1, and update latest SVN > install.neko ? I disabled static linking of zlib on 64 bits systems, > which might be your actual issue. > > Best, > Nicolas >
--

-- 
Neko : One VM to run them all
(http://nekovm.org)

Gmane