Xanda's Blog !~!

Fixing pcre++ looping bug in Macports

May
30

I’ve updated my Macports to version 2.1.1 and out of sudden, the following error/warning occur:

Warning: No port pcre++ found in the index; can't rebuild
--->  Found 0 broken port(s), determining rebuild order
--->  Rebuilding in order
--->  Scanning binaries for linking errors: 100.0%
--->  Found 1 broken file(s), matching files to ports
Warning: No port pcre++ found in the index; can't rebuild
--->  Found 0 broken port(s), determining rebuild order
--->  Rebuilding in order
--->  Scanning binaries for linking errors: 100.0%
--->  Found 1 broken file(s), matching files to ports

This is due to the pcre++ is now replaced with pcrexx package. As for the quick solution for this:

sudo port -f deactivate pcre++
sudo port -f activate pcrexx

In my case, the output is as below:

--->  The following versions of pcrexx are currently installed:
--->      pcrexx @0.9.5_1
--->      pcrexx @0.9.5_2
Error: port activate failed: Registry error: Please specify the full version as recorded in the port registry.

Now choose the latest version and activate it

sudo port -f activate pcrexx @0.9.5_2

Fix for Spidermonkey Build Issue in Darwin

Oct
15

If any you found the following error msg while compiling Spidermonkey on Darwin / Mac ?

jsobj.c: In function ‘js_ConstructObject’:
jsobj.c:2686: warning: comparison is always true due to limited range of data type
cc -o Darwin_DBG.OBJ/jsopcode.o -c -Wall -Wno-format -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX  -DDEBUG -DDEBUG_adnan -DEDITLINE -IDarwin_DBG.OBJ  jsopcode.c
cc -o Darwin_DBG.OBJ/jsparse.o -c -Wall -Wno-format -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX  -DDEBUG -DDEBUG_adnan -DEDITLINE -IDarwin_DBG.OBJ  jsparse.c
cc -o Darwin_DBG.OBJ/jsprf.o -c -Wall -Wno-format -g -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DDARWIN -DX86_LINUX  -DDEBUG -DDEBUG_adnan -DEDITLINE -IDarwin_DBG.OBJ  jsprf.c
jsprf.c: In function ‘BuildArgArray’:
jsprf.c:644: error: incompatible types in assignment
make[1]: *** [Darwin_DBG.OBJ/jsprf.o] Error 1
make: *** [all] Error 2

Personally, i’ll answer yes 🙂

And here is a quick fix for the issue:

1) Open jsprf.c
2) Add the following lines in line 61 (js-1.7.0)

#elif defined(va_copy)
#define VARARGS_ASSIGN(foo, bar) va_copy(foo,bar)

Make sure it is now somehow similar to the following:

#ifdef HAVE_VA_COPY
#define VARARGS_ASSIGN(foo, bar)        VA_COPY(foo,bar)
#elif defined(va_copy)
#define VARARGS_ASSIGN(foo, bar)        va_copy(foo,bar)
#elif defined(HAVE_VA_LIST_AS_ARRAY)
#define VARARGS_ASSIGN(foo, bar)        foo[0] = bar[0]

3) make -f Makefile.ref
4) your spider monkey is ready in Darwin_DBG.OBJ directory 🙂

Credit: http://github.com/janl/couchdbx-core/blob/ff47372552d10df00d74cb7989dfed4a19a6040d/patches/js/patch-jsprf.c

IronFox

Jun
15

IronFox is firefox in a sandbox, or more correctly, an application shell script wrapper that starts firefox in a sandbox. The policy is bundled within the app, should there be any desire to inspect the policy before use.

The goal of the policy is to let the user browse the web without interfering, but still protect the users privacy and system integrity from vulnerabilities that may exist in firefox or its plugins. The only restrictions that Ironfox gives the user is that downloads and uploads may only recide in the users download directory, and that ironfox itself can not launch any other applications.

Read more HERE

Autocomplete with bash on Mac OS

Jan
15

Make sure you have the following dependencies installed:

The only thing you need to do is to install bash-completion

sudo port install bash-completion

Done 😉