$ 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/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Headers/Carbon.r
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/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks -d __DARWIN__ -useDF -o $(BUILD)/wxPerl.rsrc $(ARCH_FLAGS) wxPerl.r
Rebuild!
$ sudo make && sudo make install
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
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!
You can find on the xbsd.nl web site the driver for OSX 10.7 and 10.8
You may have to delete the extended attribute
sudo xattr -d com.apple.quarantine /System/Library/Extensions/osx-pl2303.kex