User Tools

Site Tools


Install wxPerl for Mac

$ sudo cpanm Wx

If you get the error failed to find Carbon/Carbon.r, follow this:

Find your Carbon.r.

$ sudo find / -name Carbon.r -print
$ # => /Applications/

We're only interested by the path up to the Frameworks directory.

Go to your Wx build directory.

$ cd ~/.cpanm/work/timestamp.something/Wx-0.9927

Edit cpp/wxPerl.osx/Makefile and add the path to the Frameworks to the Rez call (line 36).

You should have a line like this:

$(RESTOOLDIR)/Rez -F /Applications/ -d __DARWIN__ -useDF -o $(BUILD)/wxPerl.rsrc $(ARCH_FLAGS) wxPerl.r


$ sudo make && sudo make install

Compile acdsn-a for Mac


Update to a threaded perlbrew version

After a pp compilation

$ ./iButton -D
Can't load '/var/folders/kb/rmbskcf93r92q67vbmj9l2jw0000gn/T/par-73626f6c6179/cache-b2f452ea2657eae919a053b9feb81e83d7f16ef1/1e6456c3.bundle' for module Wx: dlopen(/var/folders/kb/rmbskcf93r92q67vbmj9l2jw0000gn/T/par-73626f6c6179/cache-b2f452ea2657eae919a053b9feb81e83d7f16ef1/1e6456c3.bundle, 1): Library not loaded: /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/libwx_osx_cocoau_adv-2.9.dylib

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


dyld: Library not loaded: /usr/local/lib/libintl.8.dylib


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"


dyld: Library not loaded: /usr/local/lib/libintl.8.dylib


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 ... 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/
Can't locate Wx/Perl/ in @INC ...

So which pp do I use?

$ which pp

Ok, update this perlbrew version

$ cpanm PAR::Packer
$ cpanm Wx::Perl::Packager

And we can try also this

$ vi lib/ 
	use Wx::Perl::Packager;
	use Wx;

And now, check which pp:

$ which 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-
lrwxr-xr-x   1 sbolay  staff       36 16 jul 23:59 libwx_osx_cocoau_adv-2.9.4.dylib -> libwx_osx_cocoau_adv-
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- libwx_osx_cocoau_adv-2.9.dylib
$ rm libwx_osx_cocoau_core-2.9.dylib
$ cp libwx_osx_cocoau_core- libwx_osx_cocoau_core-2.9.dylib
$ rm libwx_baseu-2.9.dylib
$ cp libwx_baseu- libwx_baseu-2.9.dylib
$ rm libwx_osx_cocoau_media-2.9.dylib     
$ cp libwx_osx_cocoau_media- libwx_osx_cocoau_media-2.9.dylib
$ rm libwx_osx_cocoau_html-2.9.dylib   
$ cp libwx_osx_cocoau_html- libwx_osx_cocoau_html-2.9.dylib

And now, the compilation should be ok!


You can find on the web site the driver for OSX 10.7 and 10.8

You may have to delete the extended attribute

sudo xattr -d /System/Library/Extensions/osx-pl2303.kex
acdsn/acdsn-a/mac.txt · Last modified: 2015/07/08 10:43 by tret