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

Set up macos machines to be able to build OpenJ9 #524

Closed
sxa opened this issue Oct 10, 2018 · 7 comments
Closed

Set up macos machines to be able to build OpenJ9 #524

sxa opened this issue Oct 10, 2018 · 7 comments

Comments

@sxa
Copy link
Member

sxa commented Oct 10, 2018

Instructions to follow via @groeges - plan would be to intiially apply this to https://ci.adoptopenjdk.net/computer/build-macstadium-macos1010-2/ to validate there are no side effects before deploying on the other build machine.

Ref support being added under eclipse-openj9/openj9#36

@groeges
Copy link

groeges commented Oct 15, 2018

Setup of Mac OS system for build of OpenJDK with OpenJ9

System needs to have the following code installed on it:

  • Xcode 4.6.2 required (installed in /Applications/Xcode4/
  • nasm 2.13.03 required (install using brew)
  • bash 4.4.23 required (install using brew)
  • freemarker.jar 2.3.8 required (install using wget)

For JDK8 only
export MACOSX_DEPLOYMENT_TARGET=10.8
export SDKPATH=/Applications/Xcode4/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
export UMA_SUPPRESS_WARNINGS_AS_ERRORS=1
export OMR_WARNINGS_AS_ERRORS=1

Download the code from Github.com and make JDK
For JDK8

  • change into a directory to which the code should be downloaded.
  • run commands

For JDK11

  • change into a directory to which the code should be downloaded.
  • run commands

@groeges
Copy link

groeges commented Oct 15, 2018

JDK11 build completes successfully (on my local Yosemite system)
JDK8 build does not build successfully. Still has errors which are being worked on.

@sxa
Copy link
Member Author

sxa commented Oct 16, 2018

Will start work on configuring https://ci.adoptopenjdk.net/computer/build-macstadium-macos1010-2/ tomorrow

@sxa
Copy link
Member Author

sxa commented Oct 17, 2018

brew install nasm has brought it up from 0.98.40 to 2.13.03 (Had to chown Administrator /usr/local/man/man3 as it couldn't write to there - other /usr/local/man/man? directories were already owned by Administrator but man3 was root)

@sxa
Copy link
Member Author

sxa commented Oct 19, 2018

Passing on JDK11: https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk11/job/jdk11-mac-x64-openj9/

OpenJ9 team still have issues to work out for JDK8 - leaving this open until that has been resolved.

@groeges
Copy link

groeges commented Oct 19, 2018

@sxa555 The OpenJ9 team have now got the JDK 8 build working on Mac OS.
There are some additional pre-requisite code that needs to be installed.
This is documented at the top of this issue: eclipse-openj9/openj9#3323

@sxa
Copy link
Member Author

sxa commented Oct 22, 2018

brew install gcc49
brew install gnu-sed
brew install gnu-tar

This left me with: xcrun: error: missing DEVELOPER_DIR path: /Applications/Xcode7/Xcode.app/Contents/Developer
Fixed with:

sudo mkdir /Applications/Xcode7
sudo ln -s /Applications/Xcode.app.7.2.1 /Applications/Xcode7/Xcode.app

Then this showed up:

/Applications/Xcode.app.7.2.1/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../lib/libffi.a(sysv.o) has no symbols
In file included from /usr/include/dispatch/dispatch.h:51:0,
                 from ../omr/include_core/./unix/thrdsup.h:91,
                 from ../omr/include_core/thrdsup.h:35,
                 from ../omr/include_core/thrtypes.h:32,
                 from ObjectMonitor.cpp:28:
/usr/include/dispatch/object.h:143:15: error: expected unqualified-id before '^' token
 typedef void (^dispatch_block_t)(void);
               ^
/usr/include/dispatch/object.h:143:15: error: expected ')' before '^' token
/usr/include/dispatch/object.h:362:3: error: 'dispatch_block_t' has not been declared
   dispatch_block_t notification_block);
   ^
make[3]: *** [ObjectMonitor.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [DebugBytecodeInterpreter.o] Interrupt: 2
make[2]: *** [j9vm] Interrupt: 2
make[1]: *** [build-j9] Interrupt: 2
make: *** [j9vm-build] Interrupt: 2
Process exited

Resolved via the change in the openj9 instructions to edit line 143 of /usr/include/dispatch/object.h and replace with:

#ifdef __clang__
typedef void (^dispatch_block_t)(void);
#else
typedef void* dispatch_block_t;
#endif

PR now in to set the appropriate variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants