|
perlapp under mac os |
Posted by davide on Apr-08-2015 17:28 |
|
Hi
I have a perl program that uses chartdirector.
This program is packaged in an .exe file using perlapp from activestate and runs under windows.
Many years ago, when I first tried to make the executable, I run into the dependencies problem of perlapp, which I solved with these instructions
http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=perlchartdir58mt.dll&thread=1085032651#N1085598017
Now I'm trying to build it in an .app package under mac os x (mavericks), using again activestate perl and perlapp.
From the console I managed to install all of the dependencies and the program and chartdirector runs fine.
However, when using perlapp, I ran into very similar issues. But here there are no .dll files, so I'm not sure what I should rename and where I should put it. Perlapp complains that there is no "perlchartdir.bundle" file, while the files in perlchartdir are .dynlib. Also, I'm sadly not a mac expert.
Any pointers on how I could solve this?
thanks, regards
davide |
Re: perlapp under mac os |
Posted by Peter Kwan on Apr-09-2015 04:11 |
|
Hi davide,
I have never used PerlApp, except using it for a few hours over 10 years ago to response to
the thread you mentioned.
In Mac OS X, there is no dll. The extension is changed to .dylib (for perlchartdir???) and .so
(for libchartdir.so).
Would you mind to inform me of the exact and complete error message and when does it
occur (eg. when running PerlApp, or when running the app created by PerlApp)? I will try to
search the Internet to see if I can find any clue. You may also try to contact ActiveState
(or post in their forum) to determine how to use exactly what PerlApp needs to properly
include the .dylib and .so.
Regards
Peter Kwan |
Re: perlapp under mac os |
Posted by davide on Apr-09-2015 04:42 |
|
Hello Peter
thanks for the reply.
At the moment I might have made some progress.
First I tried to keep it simple by making an executable with one of the chartdirector sample files (anglepie.pl).
Then I tried to follow the instructions regarding windows, so I renamed perlchartdir.pm to perlchartdir518i64mt.pm and put it in /usr/local/ActivePerl-5.18/site/lib
I made a folder /usr/local/ActivePerl-5.18/site/lib/auto/perlchartdir518i64mt and inside it I put perlchartdir518i64mt.dylib and libchartdir.so
With this setup, running perl anglepie.pl from the console works.
Perlapp creates the executable, but when I run it I get
Can't load 'auto/perlchartdir518i64mt/perlchartdir518i64mt.bundle' for module perlchartdir518i64mt: dlopen(auto/perlchartdir518i64mt/perlchartdir518i64mt.bundle, 1): image not found at /</Users/davide/Desktop/bss/mavericks/anglepie>DynaLoader.pm line 224.
at /</Users/davide/Desktop/bss/mavericks/anglepie>perlchartdir518i64mt.pm line 9.
So I tried to rename perlchartdir518i64mt.dylib to perlchartdir518i64mt.bundle
This way the executable is not created, perlapp gives this error:
auto/perlchartdir518i64mt/perlchartdir518i64mt.bundle:
error: Mismatch between perlapp (x86_64) and /usr/local/ActivePerl-5.18/site/lib/auto/perlchartdir518i64mt/perlchartdir518i64mt.bundle (i386/ppc/x86_64). Producing a Universal Binary is not possible.
So I tried using lipo as stated here
http://www.advsofteng.com/unibin_info.html
and made a perlchartdir518i64mt.bundle with only x86_64
This way the executable is created, but when I run it I get
NSObjectFileImageInappropriateFile] Error loading "/var/folders/x9/vjvl85n947g51kw81f3x4zym0000gp/T/pdk-davide/1937c2b17318fc2893a110a551dc9f28/libchartdir.so" - file type incorrect
So I used lipo on libchartdir.so as well, leaving only x86_64, but I get the exact same error.
that's where I'm at so far.
thank you, regards
davide |
Re: perlapp under mac os |
Posted by davide on Apr-09-2015 05:00 |
|
updated from above:
I just copied the libchartdir.so in the same directory as the perlapp made executable, and it runs without errors!
Now I have to try and build my (much more complex) app.
Thanks a lot!
davide |
|