This is an old revision of the document!
Compile acdsn-a for Mac
Update to a threaded perlbrew version
First this small error:
dyld: Library not loaded: /usr/local/lib/libintl.8.dylib
Check what is going on
$ cd /usr/local/lib/ $ ls -rw-r--r-- 1 root wheel 60588 26 jui 22:47 libintl.8.dylib
Try to change mode
$ sudo chmod 755 libintl.8.dylib $ ls -la libintl.8* -rwxr-xr-x 1 root wheel 60588 26 jui 22:47 libintl.8.dylib
but
dyld: Library not loaded: /usr/local/lib/libintl.8.dylib
=⇒ DOES NOT WORK!
So have a look to the PATH:
$ export declare -x PATH="/Users/sbolay/perl5/perlbrew/bin:/Users/sbolay/perl5/perlbrew/perls/perl-5.16.3_WITH_THREADS_CLANG/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin"
Trying to put the perl locations at the end
$ export PATH="/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/sbolay/perl5/perlbrew/bin:/Users/sbolay/perl5/perlbrew/perls/perl-5.16.3_WITH_THREADS_CLANG/bin"
but:
dyld: Library not loaded: /usr/local/lib/libintl.8.dylib
=⇒ DOES NOT WORK!
OK, first backup the library
# mv libintl.8.dylib libintl.8.dylib.bck
Then, download MacPorts here. After installing MacPorts unarchive the pkg-config file, open a terminal, switch to the folder and type the following command:
$ sudo port selfupdate $ sudo port install pkgconfig $ pkg-config Must specify package names on the command line
=⇒ GOOD!!!!
Ok, go ahead:
$ perlbrew install -v perl-5.16.3 -Dusethreads -Dcc='clang' --as perl-5.16.3_WITH_THREADS_CLANG $ perlbrew switch perl-5.16.3_WITH_THREADS_CLANG $ hash -r $ cpanm ExtUtils::PkgConfig --> Working on ExtUtils::PkgConfig Fetching http://www.cpan.org/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-1.14.tar.gz ... OK Configuring ExtUtils-PkgConfig-1.14 ... OK Building and testing ExtUtils-PkgConfig-1.14 ... OK Successfully installed ExtUtils-PkgConfig-1.14 1 distribution installed
Install all what in modules.txt
$ cat modules.txt | cpanm
Install a missing package(not yet in modules.txt):
$ cpanm Device::SerialPort
And now
$ pp --gui -I lib -o test -x bin/EasyAccess.pl Can't locate Wx/Perl/Packager.pm in @INC ...
So which pp do I use?
$ which pp /usr/bin/pp
Ok, update this perlbrew version
$ cpanm PAR::Packer $ cpanm Wx::Perl::Packager
And we can try also this
$ vi lib/EasyAccess.pm
Add use Wx::Perl::Packager; above use Wx;
And now, check which pp:
$ which pp /Users/somebody/perl5/perlbrew/perls/perl-5.16.3_WITH_THREADS_CLANG/bin/pp
Symlinks are not properly included during the compilation with pp. So:
$ cd /Users/somebody/perl5/perlbrew/perls/perl-5.16.3_WITH_THREADS_CLANG/lib/site_perl/5.16.3/darwin-thread-multi-2level/Alien/wxWidgets/osx_cocoa_2_9_4_uni/lib
$ ls -rwxr-xr-x 1 sbolay staff 1918572 16 jul 23:59 libwx_osx_cocoau_adv-2.9.4.0.0.dylib lrwxr-xr-x 1 sbolay staff 36 16 jul 23:59 libwx_osx_cocoau_adv-2.9.4.dylib -> libwx_osx_cocoau_adv-2.9.4.0.0.dylib lrwxr-xr-x 1 sbolay staff 32 16 jul 23:59 libwx_osx_cocoau_adv-2.9.dylib -> libwx_osx_cocoau_adv-2.9.4.dylib
So, remove the symlink and cp the original file instead
$ rm libwx_osx_cocoau_adv-2.9.dylib $ cp libwx_osx_cocoau_adv-2.9.4.0.0.dylib libwx_osx_cocoau_adv-2.9.dylib
$ rm libwx_osx_cocoau_core-2.9.dylib $ cp libwx_osx_cocoau_core-2.9.4.0.0.dylib libwx_osx_cocoau_core-2.9.dylib
$ rm libwx_baseu-2.9.dylib $ cp libwx_baseu-2.9.4.0.0.dylib libwx_baseu-2.9.dylib
$ rm libwx_osx_cocoau_media-2.9.dylib $ cp libwx_osx_cocoau_media-2.9.4.0.0.dylib libwx_osx_cocoau_media-2.9.dylib
$ rm libwx_osx_cocoau_html-2.9.dylib $ cp libwx_osx_cocoau_html-2.9.4.0.0.dylib libwx_osx_cocoau_html-2.9.dylib
And now, the compilation should be ok!