Help solving the "Cannot load NekoAPI ndll" mystery?

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

Help solving the "Cannot load NekoAPI ndll" mystery?

singmajesty
Hi everyone,

I am trying to solve the "Cannot load NekoAPI ndll" mystery, but I can't  
quite figure it out.

If you compile the install-tool using "haxe InstallTool.hx", you will get  
the install tool without the Neko API dependency. However, if you compile  
with "haxe InstallTool.hx -D REQUIRE_NEKOAPI", it will enable all the  
features of the tool, which require Neko API to run.

The file is requested from "nme/Loader.hx", and testing on my Windows  
install (adding additional Lib.println() calls or enabling its debug flag)  
I can see that it can find my local copy of nekoapi.ndll, but when it  
tries to load it, it fails. This even occurs after recompiling  
nekoapi.ndll from scratch.

I am not sure why this shouldn't work. Ultimately, this falls on the  
burden of "neko/Lib.hx" in order to load symbols from the NDLL. Is there  
something wrong with this function? Is the copy of nekoapi.ndll somehow  
incompatible with x64 Windows 7? Am I the only one with these problems?

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Gamehaxe
Hi,
The only dependency of nekoapi.ndll is kernel32.dll and neko.dll.
I presume neko.dll is found because neko is actually running.
On 64 bit - it would not work if the 64-bit-ness of neko.dll
does not match nekoapi.dll - but this would be strange.
Does anyone even use 64bit neko on windows?
The other possibility is that nekoapi.dll crashes somewhere in its
startup code, or that it tries to "loadlibrary" another library
in its startup code.
On windows, the dynamic loading debug is not as good as on linux/mac,
where you can get full debug by setting the (DY)LD_DEBUG variables.

Hugh

> Hi everyone,
>
> I am trying to solve the "Cannot load NekoAPI ndll" mystery, but I can't  
> quite figure it out.
>
> If you compile the install-tool using "haxe InstallTool.hx", you will  
> get the install tool without the Neko API dependency. However, if you  
> compile with "haxe InstallTool.hx -D REQUIRE_NEKOAPI", it will enable  
> all the features of the tool, which require Neko API to run.
>
> The file is requested from "nme/Loader.hx", and testing on my Windows  
> install (adding additional Lib.println() calls or enabling its debug  
> flag) I can see that it can find my local copy of nekoapi.ndll, but when  
> it tries to load it, it fails. This even occurs after recompiling  
> nekoapi.ndll from scratch.
>
> I am not sure why this shouldn't work. Ultimately, this falls on the  
> burden of "neko/Lib.hx" in order to load symbols from the NDLL. Is there  
> something wrong with this function? Is the copy of nekoapi.ndll somehow  
> incompatible with x64 Windows 7? Am I the only one with these problems?

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

singmajesty
Maybe I'll try running on 32-bit Linux (to eliminate the 64-bit question)  
and use LD_DEBUG to see if I get more answers.


On Sat, 16 Jul 2011 19:58:46 -0700, Gamehaxe <[hidden email]> wrote:

> Hi,
> The only dependency of nekoapi.ndll is kernel32.dll and neko.dll.
> I presume neko.dll is found because neko is actually running.
> On 64 bit - it would not work if the 64-bit-ness of neko.dll
> does not match nekoapi.dll - but this would be strange.
> Does anyone even use 64bit neko on windows?
> The other possibility is that nekoapi.dll crashes somewhere in its
> startup code, or that it tries to "loadlibrary" another library
> in its startup code.
> On windows, the dynamic loading debug is not as good as on linux/mac,
> where you can get full debug by setting the (DY)LD_DEBUG variables.
>
> Hugh
>
>> Hi everyone,
>>
>> I am trying to solve the "Cannot load NekoAPI ndll" mystery, but I  
>> can't quite figure it out.
>>
>> If you compile the install-tool using "haxe InstallTool.hx", you will  
>> get the install tool without the Neko API dependency. However, if you  
>> compile with "haxe InstallTool.hx -D REQUIRE_NEKOAPI", it will enable  
>> all the features of the tool, which require Neko API to run.
>>
>> The file is requested from "nme/Loader.hx", and testing on my Windows  
>> install (adding additional Lib.println() calls or enabling its debug  
>> flag) I can see that it can find my local copy of nekoapi.ndll, but  
>> when it tries to load it, it fails. This even occurs after recompiling  
>> nekoapi.ndll from scratch.
>>
>> I am not sure why this shouldn't work. Ultimately, this falls on the  
>> burden of "neko/Lib.hx" in order to load symbols from the NDLL. Is  
>> there something wrong with this function? Is the copy of nekoapi.ndll  
>> somehow incompatible with x64 Windows 7? Am I the only one with these  
>> problems?
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Gamehaxe
Hi,
LD_DEBUG can be very good - it will tell you why something failed
too (eg, missing dependency) so it you post a log, I may be
able to see exactly what has gone wrong.

Hugh



--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Andreas Mokros
In reply to this post by singmajesty
Hi.

On Sat, 16 Jul 2011 15:46:20 -0700
"Joshua Granick" <[hidden email]> wrote:
> This even occurs after recompiling  
> nekoapi.ndll from scratch.

So you compiled nekoapi.ndll in 64bit and run neko in 32bit? This won't
work, I guess.

--
Mockey

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Gamehaxe
Hi,
Ok, there is no more nekoapi.
I guess the problem may now be moved from "nekoapi.ndll" to "nme.ndll",
but I can address that one if we get to it.

Hugh

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

toffer
Hi,

For information :
bobBook-2:02-Text toffer$ haxelib run nme "Sample.nmml" mac
Called from nme/utils/ByteArray.hx line 427
Called from nme/Loader.hx line 164
Called from nme/Loader.hx line 112
Called from nme/Loader.hx line 131
Called from C:\Motion-Twin\haxe/std/neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load library : nme.ndll  
(dlopen(nme.ndll, 1): no suitable image found.  Did find:
        /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll: unknown required load  
command 0x80000022)

lastest hxcpp / nme sources, the ndll file is here, perhap's I've miss  
something...

Le 18 juil. 11 à 17:57, Gamehaxe a écrit :

> Hi,
> Ok, there is no more nekoapi.
> I guess the problem may now be moved from "nekoapi.ndll" to  
> "nme.ndll",
> but I can address that one if we get to it.
>
> Hugh
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Gamehaxe
Hi,
Sounds like there is something incompatible with your nme.dll.
Have you tried the latest binary on on svn?  I updated it last night.

You can check the execute/read permission with
ls -l /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll

you can also try
nm /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll

And see if that gives anything interesting.

Is you haxelib 64bits?  That would be strange, but possible i guess.


*****************

I just searched this:

http://stackoverflow.com/questions/1440456/static-libraries-in-version-cross-compiled-program

So I will add the flags and see if that helps.

Hugh



> Hi,
>
> For information :
> bobBook-2:02-Text toffer$ haxelib run nme "Sample.nmml" mac
> Called from nme/utils/ByteArray.hx line 427
> Called from nme/Loader.hx line 164
> Called from nme/Loader.hx line 112
> Called from nme/Loader.hx line 131
> Called from C:\Motion-Twin\haxe/std/neko/Lib.hx line 33
> Uncaught exception - load.c(232) : Failed to load library : nme.ndll  
> (dlopen(nme.ndll, 1): no suitable image found.  Did find:
> /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll: unknown required load  
> command 0x80000022)
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

toffer
Ok, from today with the lastest binary, I've the same result.

I checked the permissions, it's ok :
-rwxr-xr-x  1 toffer  staff  3820472 18 jul 23:08 /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll

here is the result of nm command :
nm: object: /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll malformed object (unknown load command 6)

and my haxelib is 32bits.

I'll wait to give a try with the new flags.
thank's,
toffer


Le 19 juil. 11 à 13:02, Gamehaxe a écrit :

Hi,
Sounds like there is something incompatible with your nme.dll.
Have you tried the latest binary on on svn?  I updated it last night.

You can check the execute/read permission with
ls -l /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll

you can also try
nm /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll

And see if that gives anything interesting.

Is you haxelib 64bits?  That would be strange, but possible i guess.


*****************

I just searched this:

http://stackoverflow.com/questions/1440456/static-libraries-in-version-cross-compiled-program

So I will add the flags and see if that helps.

Hugh


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Gamehaxe
Hi,
I have updated the build with 10.5 compatibility.  I assume you are using  
osx 10.5?

I only added one of the flags - but I hope this does the trick for you.

It would also be good if you could test it with "nm" again.

Hugh

> Ok, from today with the lastest binary, I've the same result.
>
> I checked the permissions, it's ok :
> -rwxr-xr-x  1 toffer  staff  3820472 18 jul 23:08 /Users/toffer/
> googlecode/nme/ndll/Mac/nme.ndll
>
> here is the result of nm command :
> nm: object: /Users/toffer/googlecode/nme/ndll/Mac/nme.ndll malformed
> object (unknown load command 6)
>
> and my haxelib is 32bits.
>
> I'll wait to give a try with the new flags.
> thank's,
> toffer
>
>

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

toffer
Hi,

Yes, I have forgoten to specify, os x 10.5.8.
I have the same error with the latest build and the nm command :
Uncaught exception - load.c(352) : Primitive not found :  
nme@neko_init(5)

Thank's for the try,
toffer

Le 19 juil. 11 à 17:58, Gamehaxe a écrit :

> Hi,
> I have updated the build with 10.5 compatibility.  I assume you are  
> using osx 10.5?
>
> I only added one of the flags - but I hope this does the trick for  
> you.
>
> It would also be good if you could test it with "nm" again.
>
> Hugh


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Help solving the "Cannot load NekoAPI ndll" mystery?

Joshua Harlan Lifton
On Tue, Jul 19, 2011 at 6:12 PM, Toffer <[hidden email]> wrote:
> I have the same error with the latest build and the nm command :
> Uncaught exception - load.c(352) : Primitive not found : nme@neko_init(5)

I'm on Mac OS 10.6.8 and I'm having the same problem. I'm using the
latest SVN versions of NME and hxcpp. I defined the NEKOPATH
environment variable and rebuilt the libs from hxcpp/runtime/ using:

rm -rf obj all_objs
haxelib run hxcpp BuildLibs.xml -Diphoneos
haxelib run hxcpp BuildLibs.xml -Diphonesim
haxelib run hxcpp BuildLibs.xml -Dmac

Then, from the nekonme/project directory, I rebuilt all the ndlls using:

rm -rf obj all_objs
haxelib run hxcpp Build.xml -Dmac
haxelib run hxcpp Build.xml -Diphone -Diphoneos
haxelib run hxcpp Build.xml -Diphone -Diphonesim

Then I rebuilt the install tool from nekonme/install-tool:

haxe Compile.hxml

All the above built without errors. Permissions on
nekonme/ndll/Mac/nme.ndll are 755 and the time stamp is correct.
However, running the nm command on ndll/Mac/nme.ndll revealed 429
undefined symbols and 18 defined symbols. All the defined symbols had
to do with MPEG. If I'm interpreting the nm output correctly, then I
shouldn't be surprised that NME sample 02 doesn't build for the iphone
target:

haxelib run nme update Sample.hx iphone
Called from nme/utils/ByteArray.hx line 433
Called from nme/Loader.hx line 164
Called from nme/Loader.hx line 112
Called from nme/Loader.hx line 131
Called from /usr/lib/haxe/std/neko/Lib.hx line 33
Uncaught exception - load.c(352) : Primitive not found : nme@neko_init(5)

Did I miss a step? Has anyone verified that iOS is working with the
new install tool? I also tried rebuilding the install tool with the
REQUIRE_NEKOAPI flag:

haxe Compile.hxml -D REQUIRE_NEKOAPI

but got the same results. I'd like to migrate to the new install tool
so I can keep up with the latest and greatest. Any suggestions?

Thanks,
Josh

--
haXe - an open source web programming language
http://haxe.org