{"action":"created","issue":{"url":"https://api.github.com/repos/graalvm/sulong/issues/106","repository_url":"https://api.github.com/repos/graalvm/sulong","labels_url":"https://api.github.com/repos/graalvm/sulong/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/graalvm/sulong/issues/106/comments","events_url":"https://api.github.com/repos/graalvm/sulong/issues/106/events","html_url":"https://github.com/graalvm/sulong/issues/106","id":142380998,"number":106,"title":"Error when following README.md Getting Started","user":{"login":"bjfish","id":110023,"avatar_url":"https://avatars.githubusercontent.com/u/110023?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfish","html_url":"https://github.com/bjfish","followers_url":"https://api.github.com/users/bjfish/followers","following_url":"https://api.github.com/users/bjfish/following{/other_user}","gists_url":"https://api.github.com/users/bjfish/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfish/subscriptions","organizations_url":"https://api.github.com/users/bjfish/orgs","repos_url":"https://api.github.com/users/bjfish/repos","events_url":"https://api.github.com/users/bjfish/events{/privacy}","received_events_url":"https://api.github.com/users/bjfish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-21T15:20:11Z","updated_at":"2016-03-24T15:22:34Z","closed_at":null,"body":"I get the following error when I follow the readme \"Getting Started\" section. Do I need to install this dependency locally?\r\n\r\nDo you have a recommended way to install this dependency on Mac OSX? \r\n\r\nThank you.\r\n\r\n```\r\nException in thread \"main\" java.lang.AssertionError: java.io.IOException: java.lang.UnsatisfiedLinkError: libgfortran.so.3\r\n\tat com.oracle.truffle.llvm.LLVM.evaluateFromSource(LLVM.java:144)\r\n\tat com.oracle.truffle.llvm.LLVM.executeMain(LLVM.java:123)\r\n\tat com.oracle.truffle.llvm.LLVM.main(LLVM.java:99)\r\nCaused by: java.io.IOException: java.lang.UnsatisfiedLinkError: libgfortran.so.3\r\n\tat com.oracle.truffle.api.TruffleLanguage$AccessAPI.eval(TruffleLanguage.java:588)\r\n\tat com.oracle.truffle.api.impl.Accessor.eval(Accessor.java:163)\r\n\tat com.oracle.truffle.api.vm.PolyglotEngine$SPIAccessor.eval(PolyglotEngine.java:1177)\r\n\tat com.oracle.truffle.api.vm.PolyglotEngine.evalImpl(PolyglotEngine.java:541)\r\n\tat com.oracle.truffle.api.vm.PolyglotEngine.access$300(PolyglotEngine.java:106)\r\n\tat com.oracle.truffle.api.vm.PolyglotEngine$2.compute(PolyglotEngine.java:525)\r\n\tat com.oracle.truffle.api.vm.ComputeInExecutor.run(ComputeInExecutor.java:93)\r\n\tat com.oracle.truffle.api.vm.ComputeInExecutor.perform(ComputeInExecutor.java:83)\r\n\tat com.oracle.truffle.api.vm.PolyglotEngine.eval(PolyglotEngine.java:528)\r\n\tat com.oracle.truffle.api.vm.PolyglotEngine.eval(PolyglotEngine.java:464)\r\n\tat com.oracle.truffle.llvm.LLVM.evaluateFromSource(LLVM.java:141)\r\n\t... 2 more\r\nCaused by: java.lang.UnsatisfiedLinkError: libgfortran.so.3\r\n\tat com.oracle.graal.truffle.hotspot.nfi.HotSpotNativeFunctionInterface.getLibraryHandle(HotSpotNativeFunctionInterface.java:71)\r\n\tat com.oracle.graal.truffle.hotspot.nfi.HotSpotNativeFunctionInterface.getLibraryHandle(HotSpotNativeFunctionInterface.java:39)\r\n\tat com.oracle.truffle.llvm.nativeint.NativeLookup.getNativeFunctionHandles(NativeLookup.java:93)\r\n\tat com.oracle.truffle.llvm.nativeint.NativeLookup.getLibraryHandles(NativeLookup.java:82)\r\n\tat com.oracle.truffle.llvm.nativeint.NativeLookup.uncachedGetNativeFunctionHandle(NativeLookup.java:171)\r\n\tat com.oracle.truffle.llvm.nativeint.NativeLookup.getNativeHandle(NativeLookup.java:151)\r\n\tat com.oracle.truffle.llvm.nodes.impl.base.LLVMContext.getNativeHandle(LLVMContext.java:74)\r\n\tat com.oracle.truffle.llvm.nodes.impl.func.LLVMCallNode$LLVMUnresolvedCallNode.executeGeneric(LLVMCallNode.java:122)\r\n\tat com.oracle.truffle.llvm.nodes.impl.func.LLVMCallUnboxNodeFactory$LLVMI32CallUnboxNodeGen.executeI32(LLVMCallUnboxNodeFactory.java:188)\r\n\tat com.oracle.truffle.llvm.nodes.impl.vars.LLVMWriteNodeFactory$LLVMWriteI32NodeGen.executeVoid(LLVMWriteNodeFactory.java:189)\r\n\tat com.oracle.truffle.llvm.nodes.impl.others.LLVMBlockNode$LLVMBlockNoControlFlowNode.executeVoid(LLVMBlockNode.java:105)\r\n\tat com.oracle.truffle.llvm.nodes.impl.func.LLVMFunctionBodyNode.executeGeneric(LLVMFunctionBodyNode.java:49)\r\n\tat com.oracle.truffle.llvm.nodes.impl.func.LLVMFunctionStartNode.execute(LLVMFunctionStartNode.java:63)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:443)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:317)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:303)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:291)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callDirect(OptimizedCallTarget.java:206)\r\n\tat com.oracle.graal.truffle.OptimizedDirectCallNode.callProxy(OptimizedDirectCallNode.java:69)\r\n\tat com.oracle.graal.truffle.OptimizedDirectCallNode.call(OptimizedDirectCallNode.java:60)\r\n\tat com.oracle.truffle.llvm.nodes.impl.func.LLVMGlobalRootNode.executeProgram(LLVMGlobalRootNode.java:104)\r\n\tat com.oracle.truffle.llvm.nodes.impl.func.LLVMGlobalRootNode.execute(LLVMGlobalRootNode.java:84)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:443)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:317)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:303)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:291)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.call(OptimizedCallTarget.java:199)\r\n\tat com.oracle.truffle.llvm.nodes.impl.base.LLVMMainFunctionReturnValueRootNode$LLVMMainFunctionReturnNumberRootNode.execute(LLVMMainFunctionReturnValueRootNode.java:81)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:443)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callRoot(OptimizedCallTarget.java:317)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.callBoundary(OptimizedCallTarget.java:303)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.doInvoke(OptimizedCallTarget.java:291)\r\n\tat com.oracle.graal.truffle.OptimizedCallTarget.call(OptimizedCallTarget.java:199)\r\n\tat com.oracle.truffle.api.TruffleLanguage$AccessAPI.eval(TruffleLanguage.java:584)\r\n\t... 12 more\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/graalvm/sulong/issues/comments/200884219","html_url":"https://github.com/graalvm/sulong/issues/106#issuecomment-200884219","issue_url":"https://api.github.com/repos/graalvm/sulong/issues/106","id":200884219,"user":{"login":"mrigger","id":14328197,"avatar_url":"https://avatars.githubusercontent.com/u/14328197?v=3","gravatar_id":"","url":"https://api.github.com/users/mrigger","html_url":"https://github.com/mrigger","followers_url":"https://api.github.com/users/mrigger/followers","following_url":"https://api.github.com/users/mrigger/following{/other_user}","gists_url":"https://api.github.com/users/mrigger/gists{/gist_id}","starred_url":"https://api.github.com/users/mrigger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrigger/subscriptions","organizations_url":"https://api.github.com/users/mrigger/orgs","repos_url":"https://api.github.com/users/mrigger/repos","events_url":"https://api.github.com/users/mrigger/events{/privacy}","received_events_url":"https://api.github.com/users/mrigger/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T15:22:34Z","updated_at":"2016-03-24T15:22:34Z","body":"@lukasstadler and me tried to get Sulong running on Mac. We had problems installing GCC with MacPorts, but eventually succeeded installing version 4.6. We found the following things:\r\n\r\n- The [GCC](https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.tools/src/com/oracle/truffle/llvm/tools/GCC.java) class uses a hardcoded gcc-4.6 command. The reason for the duplication of the compilation logic in mx and on the Java side is described in #82. I will fix this to also use the environment variable instead.\r\n- As described above we use hardcoded library names in the [mx file](https://github.com/graalvm/sulong/blob/4b394160139a9c9c2eed2da6d20c03fadc4e2403/mx.sulong/mx_sulong.py#L370). We could locally execute the tests by replacing the existing library paths with `-Dsulong.DynamicNativeLibraryPath=/opt/local/lib/libgcc/libgfortran.3.dylib:/opt/local/lib/libstdc++.6.dylib:/opt/local/lib/libgmp.10.dylib`. We fully qualified the paths, since the linker cannot find them (with [dlopen](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/dlopen.3.html)) otherwise. Probably, we should use an environment variable to override the shared library paths and set the above as default on Mac.\r\n- We still could not execute all test cases, since some failed with an unsuccessful command to compile object files to executables with GCC. The object files already had an ELF header. We did not yet further investigate this issue.\r\n"}}