135u5 / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
1 stars 0 forks source link

Fixed issue with java headers on OSX #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please see my patch at:
https://github.com/errordeveloper/tinyos-wmi/commit/1845e4d30428d68c427e8c0dccd2
09223236fa45

Original issue reported on code.google.com by errordeveloper on 25 Feb 2011 at 11:08

GoogleCodeExporter commented 8 years ago
Can you please include a description of the problem? This is mostly for 
bookkeeping and records. URLs to patches isn't a great way to track and 
maintain a codebase. Thanks!

Original comment by philip.l...@gmail.com on 2 Mar 2011 at 11:21

GoogleCodeExporter commented 8 years ago
Sure, the problem is described in the comments.
The code in `tos-locate-jre` had hardcoded path
and the comments suggested that this should be
fixed eventually.

I have found that on the system which I got it's
not working becuase the symlinks are broken.
It is probably a buggy script from Apple that
is trying to symlink to the most current java
but it is somewhat broken the symlinks to 'jni.h'
and other headers.
I also fixed the spelling of proper JNI install
path and found that `uname -r` returns 10.6.0
instead of 10.6.6 (it is not certain whether
`uname -r` will return last zero for any OSX
release in the future) and therefore used an
Apple specific `sw_vers` command with a bit of
awk and sed.
The real headers turn out to be under /Developer/.

Still, in fact the JNI is being installed into
the --prefix= rather then the JNI path, btw.

Original comment by errordeveloper on 2 Mar 2011 at 11:47

GoogleCodeExporter commented 8 years ago
Sure, the problem is described in the comments.                                 

The code in `tos-locate-jre` had hardcoded path                                 

and the comments suggested that this should be                                  

fixed eventually.                                                               

I have found that on the system which I got it's                                

not working becuase the symlinks are broken.                                    

It is probably a buggy script from Apple that                                   

is trying to symlink to the most current java                                   

but it is somewhat broken the symlinks to 'jni.h'                               

and other headers.                                                              

I also fixed the spelling of proper JNI install                                 

path and found that `uname -r` returns 10.6.0                                   

instead of 10.6.6 (it is not certain whether                                    

`uname -r` will return last zero for any OSX                                    

release in the future) and therefore used an                                    

Apple specific `sw_vers` command with a bit of                                  

awk and sed.                                                                    

The real headers turn out to be under /Developer/.                              

Still, in fact the JNI is being installed into                                  

the --prefix= rather then the JNI path, btw.                                    

Original comment by errordeveloper on 2 Mar 2011 at 11:49

GoogleCodeExporter commented 8 years ago
Pardon, I sent two emails by accedent, but
forgot to attach the patch itself.
This was output from git, so I am not sure
about this two lines:

--- a/tools/tinyos/misc/tos-locate-jre
+++ b/tools/tinyos/misc/tos-locate-jre

Original comment by errordeveloper on 3 Mar 2011 at 12:31

GoogleCodeExporter commented 8 years ago

Original comment by philip.l...@gmail.com on 9 Mar 2011 at 4:11

GoogleCodeExporter commented 8 years ago
Applied the patch. Thanks!

Original comment by philip.l...@gmail.com on 22 Mar 2011 at 9:01