Showing posts with label macosx. Show all posts
Showing posts with label macosx. Show all posts

Tuesday, May 31, 2016

Eclipse 4.5 - Mars - OSX - can't open my workspace - not responding

Try starting it with -clean, if that doesn't work 
try deleting .metadata/.plugins/org.eclipse.e4.workbench/ contents.

Monday, January 6, 2014

perl: Data::Dumper dyld: lazy symbol binding failed: Symbol not found: _isWORDCHAR Referenced from: /perl5/Library/Perl/Updates/5.12.3/darwin-thread-multi-2level/auto/Data/Dumper/Dumper.bundle Expected in: flat namespace dyld: Symbol not found: _isWORDCHAR

When installing Data::Dumper package 2.143 on MacOSX with perl 5.12.3 as runtime I received test results that were bad on the Dumper.xs tests. SO I forced the installation.... bad idea... got these errors on some of the Dumper calls when debugging DBIx result sets.
dyld: Symbol not found: _isWORDCHAR
  Referenced from: /Users/me/perl5/Library/Perl/Updates/5.12.3/darwin-thread-multi-2level/auto/Data/Dumper/Dumper.bundle
  Expected in: flat namespace
Solution: manually get out there on CPAN and get 2.145
$ cd .cpan/build
$ wget http://search.cpan.org/CPAN/authors/id/S/SM/SMUELLER/Data-Dumper-2.145.tar.gz
$ tar pfvx Data-Dumper-2.145.tar.gz
$ cd Data-Dumper-2.145
$ perl Makefile.PL
$ make && make test && make install
And it starts working ... here context of my Dumper calls that failed.... hope this helps anyone!
Can't set DBI::db=HASH(0x7f819f7c4108)->{HASH(0x7f819d3eab58)}: unrecognised attribute name or invalid value at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/DBI.pm line 720.
Can't get DBI::db=HASH(0x7f819f7c4108)->{HASH(0x7f819d3eab58)}: unrecognised attribute name at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/DBI.pm line 720.
SELECT me.server_os_type_map_seq, me.created_by_nm, me.created_dt, me.updated_by_nm, me.updated_dt, me.server_type_seq, me.os_version_seq FROM (
  SELECT me.server_os_type_map_seq, me.created_by_nm, me.created_dt, me.updated_by_nm, me.updated_dt, me.server_type_seq, me.os_version_seq  FROM PMI_SCHEMA.SERVER_OS_TYPE_MAP me 
) me WHERE ROWNUM <= ?
: '100'
SELECT me.os_version_seq, me.created_by_nm, me.created_dt, me.updated_by_nm, me.updated_dt, me.os_version_desc FROM PMI_SCHEMA.OS_VERSION me WHERE ( me.os_version_seq = ? ) : '32'
dyld: lazy symbol binding failed: Symbol not found: _isWORDCHAR
  Referenced from: /Users/me/perl5/Library/Perl/Updates/5.12.3/darwin-thread-multi-2level/auto/Data/Dumper/Dumper.bundle
  Expected in: flat namespace

dyld: Symbol not found: _isWORDCHAR
  Referenced from: /Users/me/perl5/Library/Perl/Updates/5.12.3/darwin-thread-multi-2level/auto/Data/Dumper/Dumper.bundle
  Expected in: flat namespace

Wednesday, March 13, 2013

mampstack-5.3.22-0 and OCI8 Oracle on OSX 10.7.5

Installed mampstack-5.3.22-0 from bitnami.org, all defaults.... (NOTE: I tried MAMP/MAMP-PRO first and this product was not agile enough to install the OCI8 module, so stay away, unless you like to puzzle your way thru the installation)

Installed Oracle's instantclient for MacOSX x86_64 editions on oracles download site (login required)

  • instantclient-sdk-macos.x64-11.2.0.3.0.zip
  • instantclient-sqlplus-macos.x64-11.2.0.3.0.zip
  • instantclient-basic-macos.x64-11.2.0.3.0.zip
  • instantclient-tools-macos.x64-11.2.0.3.0.zip

Installation InstantClient Oracle on x86_64

Unpack all downloaded package (located in my case under ~/Downloads)
$ mkdir -p /System/Library/Oracle/
$ cd /System/Library/Oracle/
$ unzip ~/Downloads/instantclient*.zip .
Next linking all of the libraries to the general area.
$ cd /usr/lib
$ ls  /System/Library/Oracle/instantclient_11_2/*.dylib | xargs -I% -t ln -s % .
ln -s /System/Library/Oracle/instantclient_11_2/libnnz11.dylib .
ln -s /System/Library/Oracle/instantclient_11_2/libociei.dylib .
ln -s /System/Library/Oracle/instantclient_11_2/libocijdbc11.dylib .
ln -s /System/Library/Oracle/instantclient_11_2/libsqlplus.dylib .
ln -s /System/Library/Oracle/instantclient_11_2/libsqlplusic.dylib .
The result symlinked the libraries
$ ls -lrt
total 40
lrwxr-xr-x  1 akaan  wheel  60 Mar 13 13:15 libsqlplusic.dylib -> /System/Library/Oracle/instantclient_11_2/libsqlplusic.dylib
lrwxr-xr-x  1 akaan  wheel  58 Mar 13 13:15 libsqlplus.dylib -> /System/Library/Oracle/instantclient_11_2/libsqlplus.dylib
lrwxr-xr-x  1 akaan  wheel  60 Mar 13 13:15 libocijdbc11.dylib -> /System/Library/Oracle/instantclient_11_2/libocijdbc11.dylib
lrwxr-xr-x  1 akaan  wheel  56 Mar 13 13:15 libociei.dylib -> /System/Library/Oracle/instantclient_11_2/libociei.dylib
lrwxr-xr-x  1 akaan  wheel  56 Mar 13 13:15 libnnz11.dylib -> /System/Library/Oracle/instantclient_11_2/libnnz11.dylib
Follow the same process for other items
$ cd /usr/lib
$ sudo ls  /System/Library/Oracle/instantclient_11_2/*.dylib.* | xargs -I% -t ln -s % .
Next linking the include header files.
$ cd /usr/include
$ sudo ls  /System/Library/Oracle/instantclient_11_2/sdk/include/*.h | xargs -I% -t ln -s % .
Next linking sqlplus
$ cd /usr/bin
$ sudo ln -s /System/Library/Oracle/instantclient_11_2/sqlplus .
And last relink the versioned cntl file
$ cd /usr/lib
$ sudo ln -s libclntsh.dylib.11.1 libclntsh.dylib

Installation oci8 module on mampstack-5.3.22-0

Next tying in the oci8 module for PHP connectivity... First validate that sqlplus works otherwise you waste time with a broken instant client installation.
MacBook-Pro:~ johnsmith$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 13 14:15:59 2013
Copyright (c) 1982, 2012, Oracle.  All rights reserved.
Enter user-name: 
Next move to the mampstack installation directory under the php area and install the oci8 package, when prompted for the installation of the instantclient use instantclient,/usr/lib
MacBook-Pro:bin johnsmith$ cd /Applications/mampstack-5.3.22-0
MacBook-Pro:mampstack-5.3.22-0 johnsmith$ cd ./php/bin
MacBook-Pro:bin johnsmith$ ./pecl install oci8
downloading oci8-1.4.9.tgz ...
Starting to download oci8-1.4.9.tgz (169,255 bytes)
.....................................done: 169,255 bytes
10 source files, building
WARNING: php_bin /Applications/mampstack-5.3.22-0/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Can't load '/Applications/mampstack-5.3.22-0/perl/lib/5.8.8/darwin-2level/auto/Data/Dumper/Dumper.bundle' for module Data::Dumper: dlopen(/Applications/mampstack-5.3.22-0/perl/lib/5.8.8/darwin-2level/auto/Data/Dumper/Dumper.bundle, 1): Symbol not found: _PL_compiling
  Referenced from: /Applications/mampstack-5.3.22-0/perl/lib/5.8.8/darwin-2level/auto/Data/Dumper/Dumper.bundle
  Expected in: dynamic lookup
 at /Applications/mampstack-5.3.22-0/perl/lib/5.8.8/darwin-2level/Data/Dumper.pm line 36
Compilation failed in require at /usr/bin/../share/autoconf/Autom4te/C4che.pm line 35.
BEGIN failed--compilation aborted at /usr/bin/../share/autoconf/Autom4te/C4che.pm line 35.
Compilation failed in require at /usr/bin/autom4te line 43.
BEGIN failed--compilation aborted at /usr/bin/autom4te line 43.
ERROR: `phpize' failed
MacBook-Pro:bin johnsmith$ 

OCI8 - MAMPstack-5.3.22-0 - Perl Issues

To resolve this error and end up using the default perl version (in 10.7.5 installation that I have its 5.12.x)
MacBook-Pro:bin$ perl -v
This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2010, Larry Wall
Comment out the PERL5LIB definition in /Applications/mampstack-5.3.22-0/scripts/setenv.sh like this:
.....
##### PERL ENV #####
#PERL5LIB="/Applications/mampstack-5.3.22-0/perl/lib/5.8.8:/Applications/mampstack-5.3.22-0/perl/lib/site_perl/5.8.8:/Applications/mampstack-5.3.22-0/perl/lib/5.8.8/darwin-2level:/Applications/mampstack-5.3.22-0/perl/lib/site_perl/5.8.8/darwin-2level"
#export PERL5LIB
LC_ALL=en_US
export LC_ALL
.....
Close your terminal and startup a new one (flushing the environment); and retry the new settings....
MacBook-Pro:bin johnsmith$ cd /Applications/mampstack-5.3.22-0
MacBook-Pro:mampstack-5.3.22-0 johnsmith$ cd ./php/bin
MacBook-Pro:bin johnsmith$ ./pecl install oci8
downloading oci8-1.4.9.tgz ...
Starting to download oci8-1.4.9.tgz (169,255 bytes)
.....................................done: 169,255 bytes
10 source files, building
WARNING: php_bin /Applications/mampstack-5.3.22-0/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : instantclient,/usr/lib
building in /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9
running: /private/tmp/pear/temp/oci8/configure --with-oci8=instantclient,/usr/lib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i386-apple-darwin11.4.2
checking host system type... i386-apple-darwin11.4.2
checking target system type... i386-apple-darwin11.4.2
checking for PHP prefix... /Applications/mampstack-5.3.22-0/php
checking for PHP includes... -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib
checking for PHP extension directory... /Applications/mampstack-5.3.22-0/php/lib/php/extensions
checking for PHP installed headers prefix... /Applications/mampstack-5.3.22-0/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for Oracle Database OCI8 support... yes, shared
checking PHP version... 5.3.22, ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long int... yes
checking size of long int... 8
checking checking if we're on a 64-bit platform... yes
checking Oracle Instant Client directory... /usr/lib
checking Oracle Instant Client SDK header directory... /usr/include
checking Oracle Instant Client library version compatibility... 11.1
checking for ld used by cc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm output from cc object... rm: conftest.dSYM: is a directory
ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin11.4.2 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/oci8/oci8.c -o oci8.lo
mkdir .libs
 cc -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/oci8/oci8.c  -fno-common -DPIC -o .libs/oci8.o
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/oci8/oci8_lob.c -o oci8_lob.lo
 cc -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/oci8/oci8_lob.c  -fno-common -DPIC -o .libs/oci8_lob.o
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/oci8/oci8_statement.c -o oci8_statement.lo
 cc -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/oci8/oci8_statement.c  -fno-common -DPIC -o .libs/oci8_statement.o
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/oci8/oci8_collection.c -o oci8_collection.lo
 cc -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/oci8/oci8_collection.c  -fno-common -DPIC -o .libs/oci8_collection.o
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/oci8/oci8_interface.c -o oci8_interface.lo
 cc -I. -I/private/tmp/pear/temp/oci8 -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/oci8/oci8_interface.c  -fno-common -DPIC -o .libs/oci8_interface.o
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=link cc -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/include -I/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/main -I/private/tmp/pear/temp/oci8 -I/Applications/mampstack-5.3.22-0/php/include/php -I/Applications/mampstack-5.3.22-0/php/include/php/main -I/Applications/mampstack-5.3.22-0/php/include/php/TSRM -I/Applications/mampstack-5.3.22-0/php/include/php/Zend -I/Applications/mampstack-5.3.22-0/php/include/php/ext -I/Applications/mampstack-5.3.22-0/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o oci8.la -export-dynamic -avoid-version -prefer-pic -module -rpath /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/modules  oci8.lo oci8_lob.lo oci8_statement.lo oci8_collection.lo oci8_interface.lo -lclntsh
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/oci8.so -bundle  .libs/oci8.o .libs/oci8_lob.o .libs/oci8_statement.o .libs/oci8_collection.o .libs/oci8_interface.o  -lclntsh
dsymutil .libs/oci8.so || :
creating oci8.la
(cd .libs && rm -f oci8.la && ln -s ../oci8.la oci8.la)
/bin/sh /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/libtool --mode=install cp ./oci8.la /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/modules
cp ./.libs/oci8.so /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/modules/oci8.so
cp ./.libs/oci8.lai /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/modules/oci8.la
----------------------------------------------------------------------
Libraries have been installed in:
   /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/oci8-1.4.9/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable
     during execution

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9" install
Installing shared extensions:     /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0/php/lib/php/extensions/
running: find "/private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9" | xargs ls -dils
20501804   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9
20502308   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications
20502309   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0
20502310   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0/php
20502311   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0/php/lib
20502312   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0/php/lib/php
20502313   0 drwxr-xr-x  3 johnsmith  wheel     102 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0/php/lib/php/extensions
20502314 384 -rwxr-xr-x  1 johnsmith  wheel  194492 Mar 13 12:40 /private/tmp/pear/temp/pear-build-johnsmithUbHMFa/install-oci8-1.4.9/Applications/mampstack-5.3.22-0/php/lib/php/extensions/oci8.so

Build process completed successfully
Installing '/Applications/mampstack-5.3.22-0/php/lib/php/extensions/oci8.so'
install ok: channel://pecl.php.net/oci8-1.4.9
configuration option "php_ini" is not set to php.ini location
You should add "extension=oci8.so" to php.ini
MacBook-Pro:bin johnsmith$ 

Altering PHP.ini

If you see messages like this one in your /Applications/mampstack-5.3.22-0/apache2/logs/error_log, it means that your oci8 shared object cannot be loaded by the Apache instance;
[Wed Mar 13 14:02:52 2013] [warn] RSA server certificate CommonName (CN) `signings-macbook-pro.local' does NOT match server name!?
PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/mampstack-5.3.22-0/php/lib/php/extensions/oci8' - dlopen(/Applications/mampstack-5.3.22-0/php/lib/php/extensions/oci8, 9): image not found in Unknown on line 0
Do the following
MacBook-Pro:etc johnsmith$ cd /Applications/mampstack-5.3.22-0/php/etc
MacBook-Pro:etc johnsmith$ vi php.ini 
add oci8 extension
.....
; Local Variables:
; tab-width: 4
; End:
;extension=oauth.so
;extension=memcache.so
;extension=uploadprogress.so
extension=apc.so
extension=oci8.so
.....
MacBook-Pro:etc johnsmith$ chmod 755 /Applications/mampstack-5.3.22-0/php/lib/php/extensions/oci8.so
Make sure that the extension is defined at the proper section otherwise it will not load correctly with the same image not found message in the error log (/Applications/mampstack-5.3.22-0/apache2/logs/error_log).

My First Oracle Test OCI8-PHP-MAMP

First the connect string; if you have trouble with the connect string try the tnsping utility (unfortunately not part of the instantclient).
$ tnsping PMI_SVC1_DEV
TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 13-MAR-2013 18:26:22
Copyright (c) 1997,  2007, Oracle.  All rights reserved.
Used parameter files:
/opt/oracle/product/10.2.0.4/network/admin/sqlnet.ora
Used LDAP adapter to resolve the alias
Attempting to contact (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=[hostname])(PORT=[listener-port])))(CONNECT_DATA=(SERVICE_NAME=[servicename])(SRVR=DEDICATED)))
OK (0 msec)
Finally here an oracle.php file that can be dropped in the /Application//mampstack-5.3.22-0/apache2/htdocs directory. Open a browser and test the integration

Tuesday, July 31, 2012

Mac OS Grab Screencapture defaults

# Grab File type for screen captures 
defaults write com.apple.screencapture type -string [png,jpg,pdf...]
# Grab Screen capture folder 
defaults write com.apple.screencapture location [~/Desktop/]
# Grab Screenshot file name 
defaults write com.apple.screencapture name -string
# Grab Screenshot file format 
defaults write com.apple.screencapture type -string
# Grab Show shadows on captured windows 
defaults write com.apple.screencapture disable-shadow -boolean-neg


Example:
#!/bin/bash
defaults write com.apple.screencapture type -string PNG
defaults write com.apple.screencapture location ~/Desktop/ScreenShots
# reset the ui server
killall SystemUIServer



Friday, July 20, 2012

Set a blazingly fast keyboard repeat rate (cursor movement) in Terminal MacOSX

(plagiarized from http://hints.macworld.com/article.php?story=20090823193018149) Everybody knows that you can get a pretty fast keyboard repeat rate by changing a slider on the Keyboard tab of the Keyboard & Mouse System Preferences panel. But you can make it even faster! In Terminal, run this command:
defaults write NSGlobalDomain KeyRepeat -int 0
Then log out and log in again. The fastest setting obtainable via System Preferences is 2 (lower numbers are faster), so you may also want to try a value of 1 if 0 seems too fast. You can always visit the Keyboard & Mouse System Preferences panel to undo your changes. You may find that a few applications don't handle extremely fast keyboard input very well, but most will do just fine with it.

Monday, June 4, 2012

Adding size Column to Saved Searches

Add Size and other columns to search results ... stolen and plagiarized for my own selfish need. I was very disappointed that I couldn't add the Size column to the list view in search results. Only Date Created and Date Modified were added as options in 10.6; the others are grayed out. Fortunately, I found a way to force the Size column to appear, as well as Comments, Version and Label columns. You'll have to edit the com.apple.finder.plist file found in
~/Library/Preferences
, using the Property List Editor app (included with Xcode) or PlistEdit Pro. Open the Root node, then navigate down into
SearchViewSettings » ListViewSettings » columns
. Then choose the column you want to activate in the column list (ie. Size), and set the visible key to yes. Save the .plist and relaunch the Finder (Option-Control-click on the Finder icon in the Dock). Note: you must have done at least one search, and selected one of the additional columns in the View Options panel for the search results (Date Created, for example), or else your .plist file may not contain the SearchViewSettings node. Warning: Apple probably disabled these columns for a good reason, as there may be some bugs that could cause problems on your system. I didn't have any problems with the size column, but be warned.

Friday, February 3, 2012

Mac OSX - running xterm and X11 xhost: unable to open display

So alright you have Mac OSX. Yay I I have a VPN to the office. Yay II (ip vpn adapter: 172.18.146.250) I have oodles of linux boxes! Yay III The problem: One odd ball process on my linux will throw a X11 Graphics error so how to get around that.... Try 1: Do the standard export and xhost + trick open Terminal.app and run:
computer:~ ~$ export DISPLAY=172.18.146.250:0
computer:~ ~$ xhost +
xhost:  unable to open display "172.18.146.250:0"
computer:~ ~$ 

Thats not right... lets start the Xserver in background (X Server startcmd is 'X').... and do this again...
computer:~ ~$ X &
launch_msg("CheckIn") IPC failure: Operation not permitted
Xquartz: Unable to locate waiting server: org.x.X11
Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11
Xquartz: Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly
..SCM BUILD BOX profile been setup..
================================================
X11.app: main(): argc=2
 argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
 argv[1] = --listenonly
Waiting for startup parameters via Mach IPC.
X11.app: No launchd socket handed off, unsetting DISPLAY
X11.app: do_start_x11_server(): argc=1
 argv[0] = X
Xquartz starting:
X.Org X Server 1.4.2-apple56
Build Date: 20100624
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base

computer:~ ~$
Try 2: Now open the xterm under the X11 Application that has been started...
bash-3.2$ export DISPLAY=172.18.146.250:0
bash-3.2$ xhost +
access control disabled, clients can connect from any host
bash-3.2$ 

Tuesday, December 27, 2011

KeyRemapForMacBook and Kinesis Classic Keyboad mapping private.xml

The KeyRemapFor4MacBook tool is excellent to map any key or mouse event to your needs. I have a Kinesis Classic Ergonomic keyboard (PS1) and wanted to use it in my new office setup. Love the keyboard, love the Mac however both together the do not play nice (plus I do not want to buy a new Kinesis with Multimedia keymapping) So here we are the following details for the private.xml for Kenisis Classic Using the following translation tables: Key Mapping The first thing is to identify the make and model of the keyboard that I have. Goto the "About This Mac" and click "More Info" and a detailed summary of all the hardware and software metadata pops up.
NOTE: scroll down for version 8 syntax which has slightly changed... Its a work in progress but here the full what I have defined as the private.xml
<?xml version="1.0"?>
<root>
  <devicevendordef>
    <vendorname>Kinesis</vendorname>
    <vendorid>0x0d3d</vendorid>
  </devicevendordef>
  <deviceproductdef>
    <productname>Classic</productname>
    <productid>0x001</productid>
  </deviceproductdef>
  <appdef>
    <appname>com.apple.finder</appname>
    <equal>com.apple.finder</equal>
  </appdef>
  <appdef>
    <appname>RDC</appname>
    <equal>com.microsoft.rdc</equal>
  </appdef>
  <appdef>
    <appname>TERMINAL</appname>
    <equal>com.apple.Terminal</equal>
  </appdef>
  <item>
    <name>Kinesis Bindings</name>
    <identifier>private.deviceproductdef</identifier>
    <device_only>DeviceVendor::Kinesis, DeviceProduct::Classic
    </device_only>
    <list>
      <item>
        <name>Keys for Kinesis</name>
        <not>TERMINAL</not>
        <not>RDC</not>
        <!-- Change the Kinesis Alt, TAB / Command to TAB -->
        <autogen>--KeyToKey-- KeyCode::TAB, ModifierFlag::OPTION_R,
          KeyCode::TAB, ModifierFlag::COMMAND_R
        </autogen>
        <!-- Change the Kinesis Alt, LeftArrow / Spaces Ctrl LeftArrow -->
        <autogen>--KeyToKey-- KeyCode::CURSOR_LEFT, ModifierFlag::OPTION_R,
          KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_R
        </autogen>
        <autogen>--KeyToKey-- KeyCode::CURSOR_RIGHT, ModifierFlag::OPTION_R,
          KeyCode::CURSOR_RIGHT, ModifierFlag::CONTROL_R
        </autogen>
        <!-- Change the Kinesis Ctrl-END / Ctrl-HOME to HOME or END -->
        <autogen>--KeyToKey-- KeyCode::HOME, ModifierFlag::COMMAND_R,
          KeyCode::HOME, ModifierFlag::FN
        </autogen>
        <autogen>--KeyToKey-- KeyCode::END, ModifierFlag::COMMAND_R,
          KeyCode::END, ModifierFlag::FN
        </autogen>
        <!-- Change the Kinesis END and HOME key to go to the begin and end of a 
          line -->
        <autogen>--KeyToKey-- KeyCode::HOME, KeyCode::CURSOR_LEFT,
          ModifierFlag::COMMAND_L
        </autogen>
        <autogen>--KeyToKey-- KeyCode::END, KeyCode::CURSOR_RIGHT,
          ModifierFlag::COMMAND_R
        </autogen>
        <!-- Change the Kinesis Alt-Left and Alt-Right key to go to forward or backwards 
          one word -->
        <autogen>--KeyToKey-- KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_R,
          KeyCode::CURSOR_LEFT, ModifierFlag::OPTION_L
        </autogen>
        <autogen>--KeyToKey-- KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_R,
          KeyCode::CURSOR_RIGHT, ModifierFlag::OPTION_R
        </autogen>
        <!-- Change the Kinesis Ctrls to Command buttons -->
        <autogen>--KeyToKey-- KeyCode::CONTROL_L, KeyCode::COMMAND_L
        </autogen>
        <!-- Change the Kinesis Ctrls to Command buttons -->
        <autogen>--KeyToKey-- KeyCode::CONTROL_R, KeyCode::COMMAND_R
        </autogen>
      </item>
      <item>
        <name>Kinesis Command Key under Alt for Terminal only</name>
        <only>TERMINAL</only>
        <autogen>--KeyToKey-- KeyCode::OPTION_R, KeyCode::COMMAND_R</autogen>
      </item>
    </list>
  </item>
</root>

Version 8 Syntax

With the release of v8.x of the KeyRemapForMacBook also the syntax changed... thus the example above won't work... here the v8 of the same mapping for Kinesis.
<?xml version="1.0"?>
<root>
 <devicevendordef>
  <vendorname>Kinesis</vendorname>
  <vendorid>0x0d3d</vendorid>
 </devicevendordef>
 
 <deviceproductdef>
  <productname>Classic</productname>
  <productid>0x001</productid>
 </deviceproductdef>
 
 <appdef>
  <appname>com.apple.finder</appname>
  <equal>com.apple.finder</equal>
 </appdef>
 
 <appdef>
  <appname>RDC</appname>
  <equal>com.microsoft.rdc</equal>
 </appdef>
 
 <appdef>
  <appname>ECLIPSE</appname>
  <equal>org.eclipse.eclipse</equal>
 </appdef>
 
 <appdef>
  <appname>TERMINAL</appname>
  <equal>com.apple.Terminal</equal>
 </appdef>
 
 <item>
  <name>Kinesis Bindings</name>
  <device_only>DeviceVendor::Kinesis, DeviceProduct::Classic</device_only>
  <item>
   <name>Keys for Kinesis</name>
   <appendix>Keys for Kinesis Keyboard on MacOSX</appendix>
   <not>TERMINAL</not>
   <not>RDC</not>
   <identifier>kinesis.mapping.basic</identifier>
   <!-- Change the Kinesis Alt, TAB / Command to TAB -->
   <autogen>__KeyToKey__ KeyCode::TAB, ModifierFlag::OPTION_R,
    KeyCode::TAB, ModifierFlag::COMMAND_R
   </autogen>
   <!-- Change the Kinesis Alt, LeftArrow / Spaces Ctrl LeftArrow -->
   <autogen>__KeyToKey__ KeyCode::CURSOR_LEFT, ModifierFlag::OPTION_R,
    KeyCode::CURSOR_LEFT, ModifierFlag::CONTROL_R
   </autogen>
   <autogen>__KeyToKey__ KeyCode::CURSOR_RIGHT, ModifierFlag::OPTION_R,
    KeyCode::CURSOR_RIGHT, ModifierFlag::CONTROL_R
   </autogen>
   <!-- Change the Kinesis Ctrl-END / Ctrl-HOME to HOME or END -->
   <autogen>__KeyToKey__ KeyCode::HOME, ModifierFlag::COMMAND_R,
    KeyCode::HOME, ModifierFlag::FN
   </autogen>
   <autogen>__KeyToKey__ KeyCode::END, ModifierFlag::COMMAND_R,
    KeyCode::END, ModifierFlag::FN
   </autogen>
   <!-- Change the Kinesis END and HOME key to go to the begin and end of 
    a line -->
   <autogen>__KeyToKey__ KeyCode::HOME, KeyCode::CURSOR_LEFT,
    ModifierFlag::COMMAND_L
   </autogen>
   <autogen>__KeyToKey__ KeyCode::END, KeyCode::CURSOR_RIGHT,
    ModifierFlag::COMMAND_R
   </autogen>
   <!-- Change the Kinesis Alt-Left and Alt-Right key to go to forward or 
    backwards one word -->
   <autogen>__KeyToKey__ KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_R,
    KeyCode::CURSOR_LEFT, ModifierFlag::OPTION_L
   </autogen>
   <autogen>__KeyToKey__ KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_R,
    KeyCode::CURSOR_RIGHT, ModifierFlag::OPTION_R
   </autogen>
   <!-- Change the Kinesis Ctrls to Command buttons -->
   <autogen>__KeyToKey__ KeyCode::CONTROL_L, KeyCode::COMMAND_L
   </autogen>
   <!-- Change the Kinesis Ctrls to Command buttons -->
   <autogen>__KeyToKey__ KeyCode::CONTROL_R, KeyCode::COMMAND_R
   </autogen>
  </item>
  <item>
   <name>Kinesis Command Key under Alt for Terminal only</name>
   <only>TERMINAL</only>
   <identifier>kinesis.terminal</identifier>
   <autogen>__KeyToKey__ KeyCode::K, VK_OPTION,
    KeyCode::EQUAL, ModifierFlag::CONTROL_R</autogen>
   <!-- Change the Kinesis Ctrls to Command buttons -->
   <autogen>__KeyToKey__ KeyCode::CONTROL_R, KeyCode::COMMAND_R
   </autogen>
  </item>
  <item>
   <name>Kinesis Command Key under Alt for Eclipse only</name>
   <only>ECLIPSE</only>
   <identifier>kinesis.eclipse</identifier>
   <!-- Change the Kinesis Ctrl - Space to  buttons -->
   <autogen>__KeyToKey__ KeyCode::SPACE, VK_COMMAND,
        KeyCode::SPACE, ModifierFlag::CONTROL_L </autogen>
  </item>
  <!-- 
   org.eclipse.eclipse

   -->
 </item>
</root> 

Reboot Windows From macosx RDP session

There is a lot of confusing key combinations out there but essentially this is my recipe on my MacOSX 10.6.x with RDP "Remote Desktop Connection Client for Mac" by Microsoft v2.0.0.0
  1. perform a show desktop which is really minimize all running applications on the Windows side in the RDP session.
  2. click on the desktop of the Windows side in the RDP session and hit Fn-Option-Command-F4 and you will get presented with the Restart/Shutdown/Lock options on the windows machine