Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on osx due to relative paths issue #286

Closed
matiwinnetou opened this issue Jun 22, 2017 · 8 comments
Closed

Build fails on osx due to relative paths issue #286

matiwinnetou opened this issue Jun 22, 2017 · 8 comments

Comments

@matiwinnetou
Copy link
Contributor

matiwinnetou commented Jun 22, 2017

J2V8 git:(hard-coded-paths) uname -a
Darwin Mateuszs-iMac.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

python build.py -t macos -a x64

I managed to built j2v8 by hardcoding paths:
https://github.com/eclipsesource/J2V8/compare/master...matiwinnetou:hard-coded-paths?expand=1

@drywolf perhaps you can see what is the problem, dunno why but relative paths do not work on osx

success and in target dir on OSX I have:
j2v8_macos_x86_64-4.8.0-SNAPSHOT.jar

@irbull you mentioned that release for OSX is lots of manual work. I am happy to include a build file from my machine here for some inclusion to mvn central?
j2v8_macos_x86_64-4.8.0-SNAPSHOT.jar.gz

@drywolf
Copy link
Contributor

drywolf commented Jun 23, 2017

Hi @matiwinnetou

Thanks for the testing & feedback. Did you try if adding ./ in front of the paths makes a difference instead of the full paths ?

like..

// instead of
u.shell("mkdir", "/Users/mati/Devel/OpenSource/J2V8/cmake.out/$PLATFORM.$ARCH") + \
// use
u.shell("mkdir", "./cmake.out/$PLATFORM.$ARCH") + \

Can you please try that and let me know if this also fixes the issue. I will then include those changes in my next PR.

@matiwinnetou
Copy link
Contributor Author

I will test this as soon as possible and report

@matiwinnetou
Copy link
Contributor Author

@drywolf unfortunately not

BTW I checked this already on two osx machines, at home and at work, both fail with the same errors:

 build_system/config_macos.py | 2 +-                                                                                                                                                                                                                                          
 1 file changed, 1 insertion(+), 1 deletion(-)                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                              
diff --git a/build_system/config_macos.py b/build_system/config_macos.py                                                                                                                                                                                                      
index 948129c..0b1318f 100644                                                                                                                                                                                                                                                 
--- a/build_system/config_macos.py                                                                                                                                                                                                                                            
+++ b/build_system/config_macos.py                                                                                                                                                                                                                                            
@@ -35,7 +35,7 @@ macos_config.build_step(c.build_node_js, build_node_js)                                                                                                                                                                                                     
 #-----------------------------------------------------------------------                                                                                                                                        
 def build_j2v8_cmake(config):                                                                                                                                        
     return \                                                                                                                                        
-        u.shell("mkdir", "cmake.out/$PLATFORM.$ARCH") + \                                                                                                                                                                                                                    
+        u.shell("mkdir", "./cmake.out/$PLATFORM.$ARCH") + \                                                                                                                                                                                                                  
         ["cd cmake.out/$PLATFORM.$ARCH"] + \                                                                                                                                        
         u.shell("rm", "CMakeCache.txt CMakeFiles/") + \                                                                                                                                        
         ["cmake ../../"]                                                                                                                                        

@matiwinnetou
Copy link
Contributor Author

matiwinnetou commented Jun 23, 2017

GNU bash, version 4.4.12(1)-release (x86_64-apple-darwin16.3.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
SHELL building macos@x86 => j2v8cmake
/bin/sh: cmake: command not found
Traceback (most recent call last):
  File "build.py", line 311, in <module>
    execute_build(args)
  File "build.py", line 307, in execute_build
    execute_build_step(target_compiler, target_step)
  File "build.py", line 266, in execute_build_step
    compiler.build(build_step)
  File "/Users/mszczap/Devel/OpenSource/J2V8/build_system/cross_build.py", line 60, in build
    self.exec_build(config)
  File "/Users/mszczap/Devel/OpenSource/J2V8/build_system/shell_build.py", line 26, in exec_build
    self.exec_cmd(shell_str, config)
  File "/Users/mszczap/Devel/OpenSource/J2V8/build_system/cross_build.py", line 79, in exec_cmd
    utils.execute(cmd, dir)
  File "/Users/mszczap/Devel/OpenSource/J2V8/build_system/build_utils.py", line 37, in execute
    raise subprocess.CalledProcessError(return_code, cmd)
subprocess.CalledProcessError: Command 'cd /Users/mszczap/Devel/OpenSource/J2V8 && python /Users/mszczap/Devel/OpenSource/J2V8/build_system/mkdir.py ./cmake.out/macos.x86 && cd cmake.out/macos.x86 && python /Users/mszczap/Devel/OpenSource/J2V8/build_system/rm.py CMakeCache.txt CMakeFiles/ && cmake ../../' returned non-zero exit status 127

@matiwinnetou
Copy link
Contributor Author

wait I don't have cmake at work!

@matiwinnetou
Copy link
Contributor Author

brew install cmake
brew install make

@matiwinnetou
Copy link
Contributor Author

All fine:

[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-bundle-plugin:3.3.0:bundle (default-bundle) @ j2v8_macos_x86_64 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.256 s
[INFO] Finished at: 2017-06-23T10:39:52+02:00
[INFO] Final Memory: 25M/222M
[INFO] ------------------------------------------------------------------------

@matiwinnetou
Copy link
Contributor Author

I will prepare PR

matiwinnetou pushed a commit to matiwinnetou/J2V8 that referenced this issue Jun 23, 2017
matiwinnetou pushed a commit to matiwinnetou/J2V8 that referenced this issue Jun 23, 2017
@irbull irbull closed this as completed in fc34aa5 Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants