User Tools

Site Tools


acdsn:acdsn-a:mac

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
acdsn:acdsn-a:mac [2013/08/19 08:44] – created sbolayacdsn:acdsn-a:mac [2015/07/08 08:25] tret
Line 1: Line 1:
 +==== Install wxPerl for Mac ====
 +
 +  # 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
 +  - 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 directory (a parent dir of your ''Carbon.r'') to the ''Rez'' line (36): ''-F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks''
 +  - 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''
 +
 ==== Compile acdsn-a for Mac ==== ==== Compile acdsn-a for Mac ====
 FIXME FIXME
Line 5: Line 16:
   * http://www.perlmonks.org/?node_id=953822   * http://www.perlmonks.org/?node_id=953822
  
-dyld: Library not loaded: /usr/local/lib/libintl.8.dylib+http://par.wikia.com/wiki/FAQ
  
-mbp-Sylvain:lib sbolay+After a pp compilation 
--rw-r--r--   root  wheel    60588 26 jui 22:47 libintl.8.dylib+  ./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
  
-mbp-Sylvain:lib sbolay$ sudo chmod 755 libintl.8.dylib 
  
-mbp-Sylvain:lib sbolay$ ls -la libintl.8* +First this small error
--rwxr-xr-x  1 root  wheel  60588 26 jui 22:47 libintl.8.dylib+  dyldLibrary not loaded: /usr/local/lib/libintl.8.dylib
  
-dyld: Library not loaded: /usr/local/lib/libintl.8.dylib +Check what is going on  
-==> DOES NOT WORK!+  $ 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
  
-So: +but 
-mbp-Sylvain:~ sbolay$ export +  dyld: Library not loaded: /usr/local/lib/libintl.8.dylib
-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" +
- +
-mbp-Sylvain:easyaccess-app sbolay$ 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+
 ==> DOES NOT WORK! ==> DOES NOT WORK!
  
-mbp-Sylvain:lib sbolay# mv libintl.8.dylib libintl.8.dylib.bck 
  
 +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"
  
-You can download MacPorts here. After installing MacPorts unarchive the pkg-config file, open a terminal, switch to the folder and type the following command:+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"
  
-mbp-Sylvain:pkg-config-0.27 sbolay$ sudo port selfupdate +but
-mbp-Sylvain:pkg-config-0.27 sbolay$ sudo port install pkgconfig+  dyldLibrary not loaded: /usr/local/lib/libintl.8.dylib 
 +==> DOES NOT WORK!
  
-mbp-Sylvain:pkg-config-0.27 sbolay$ pkg-config  +OK, first backup the library 
-Must specify package names on the command line+  # mv libintl.8.dylib libintl.8.dylib.bck
  
 +Then, download MacPorts [[http://www.macports.org/|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!!!! ==> GOOD!!!!
  
-mbp-Sylvain:libconfig-1.4.8 sbolay$ perlbrew install -v perl-5.16.3 -Dusethreads -Dcc='clang' --as perl-5.16.3_WITH_THREADS_CLANG+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
  
-mbp-Sylvain:pkg-config-0.27 sbolay$ perlbrew switch perl-5.16.3_WITH_THREADS_CLANG +Install all what in modules.txt 
-mbp-Sylvain:libconfig-1.4.8 sbolayhash -r +  cat modules.txt | cpanm
-mbp-Sylvain:pkg-config-0.27 sbolay$ cpanm ExtUtils::PkgConfig+
  
 +Install a missing package(not yet in modules.txt):
 +  $ cpanm Device::SerialPort
  
-mbp-Sylvain:pkg-config-0.27 sbolay$ cpanm ExtUtils::PkgConfig +And now  
---> Working on ExtUtils::PkgConfig +  $ pp --gui -I lib -o test -x bin/EasyAccess.pl 
-Fetching http://www.cpan.org/authors/id/X/XA/XAOC/ExtUtils-PkgConfig-1.14.tar.gz ... OK +  Can't locate Wx/Perl/Packager.pm in @INC ...
-Configuring ExtUtils-PkgConfig-1.14 ... OK +
-Building and testing ExtUtils-PkgConfig-1.14 ... OK +
-Successfully installed ExtUtils-PkgConfig-1.14 +
-1 distribution installed+
  
 +So which pp do I use?
 +  $ which pp
 +  /usr/bin/pp
  
-mbp-Sylvain:easyaccess-app sbolaycat modules.txt | cpanm+Ok, update this perlbrew version 
 +  $ cpanm PAR::Packer 
 +  $ cpanm Wx::Perl::Packager
  
-mbp-Sylvain:easyaccess-app sbolay$ cpanm Device::SerialPort +And we can try also this 
- +  vi lib/EasyAccess.pm  
-mbp-Sylvain:easyaccess-app sbolaypp --gui -I lib -o test -x bin/EasyAccess.pl +<code perl>
- +
-Can't locate Wx/Perl/Packager.pm in @INC ... +
- +
-mbp-Sylvain:easyaccess-app sbolay$ which pp +
-/usr/bin/pp +
- +
-mbp-Sylvain:easyaccess-app sbolay$ cpanm PAR::Packer +
- +
-mbp-Sylvain:easyaccess-app sbolay$ cpanm Wx::Perl::Packager +
- +
-mbp-Sylvain:easyaccess-app sbolay$ vi lib/EasyAccess.pm +
 Add Add
  use Wx::Perl::Packager;  use Wx::Perl::Packager;
 above above
  use Wx;  use Wx;
 +</code>
  
-mbp-Sylvain:easyaccess-app sbolay$ which pp +And now, check which pp: 
-/Users/sbolay/perl5/perlbrew/perls/perl-5.16.3_WITH_THREADS_CLANG/bin/pp  +  $ which pp 
- +  /Users/somebody/perl5/perlbrew/perls/perl-5.16.3_WITH_THREADS_CLANG/bin/pp 
- +
- +
- +
- +
-mbp-Sylvain:lib sbolay$ pwd +
-/Users/sbolay/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+
  
-mbp-Sylvain:lib sbolayrm libwx_osx_cocoau_adv-2.9.dylib  +Symlinks are not properly included during the compilation with pp. So: 
-mbp-Sylvain:lib sbolay$ cp libwx_osx_cocoau_adv-2.9.4.0.0.dylib libwx_osx_cocoau_adv-2.9.dylib+  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
  
-mbp-Sylvain:lib sbolay$ rm libwx_osx_cocoau_core-2.9.dylib +  $ ls 
-mbp-Sylvain:lib sbolay$ cp libwx_osx_cocoau_core-2.9.4.0.0.dylib libwx_osx_cocoau_core-2.9.dylib+  -rwxr-xr-x   sbolay  staff  1918572 16 jul 23:59 libwx_osx_cocoau_adv-2.9.4.0.0.dylib 
 +  lrwxr-xr-x   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
  
-mbp-Sylvain:lib sbolay$ rm libwx_baseu-2.9.dylib +So, remove the symlink and cp the original file instead 
-mbp-Sylvain:lib sbolay$ cp libwx_baseu-2.9.4.0.0.dylib libwx_baseu-2.9.dylib+  $ 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
  
-mbp-Sylvain:lib sbolay$ rm libwx_osx_cocoau_media-2.9.dylib      +  $ rm libwx_osx_cocoau_core-2.9.dylib 
-mbp-Sylvain:lib sbolay$ cp libwx_osx_cocoau_media-2.9.4.0.0.dylib libwx_osx_cocoau_media-2.9.dylib+  $ cp libwx_osx_cocoau_core-2.9.4.0.0.dylib libwx_osx_cocoau_core-2.9.dylib
  
-mbp-Sylvain:lib sbolay$ rm libwx_osx_cocoau_html-2.9.dylib    +  $ rm libwx_baseu-2.9.dylib 
-mbp-Sylvain:lib sbolay$ cp libwx_osx_cocoau_html-2.9.4.0.0.dylib libwx_osx_cocoau_html-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!
  
 +===== Driver =====
 +You can find on the [[http://www.xbsd.nl/2011/07/pl2303-serial-usb-on-osx-lion.html|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
acdsn/acdsn-a/mac.txt · Last modified: 2015/07/08 08:43 by tret