llvm fails to build
Hi all,
trying to compile openjdk-6, it fails with:
| /media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp: In constructor '{anonymous}::StatSymbols::StatSymbols()':
| /media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp:69:67: error: 'lseek64' was not declared in this scope
| make[2]: *** [lib/ExecutionEngine/JIT/CMakeFiles/LLVMJIT.dir/Intercept.cpp.o] Error 1
| make[2]: Leaving directory `/media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/build'
| make[1]: *** [lib/ExecutionEngine/JIT/CMakeFiles/LLVMJIT.dir/all] Error 2
| make[1]: *** Waiting for unfinished jobs....I'm using master branches.
Is this a known issue?
Any ideas how to solve?
Thanks,
Jaap
Quoted 17 lines · Jaap de Jong
Hi all,
trying to compile openjdk-6, it fails with:
| /media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp:
In constructor '{anonymous}::StatSymbols::StatSymbols()':
| /media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp:69:67:
error: 'lseek64' was not declared in this scope
| make[2]: ***
[lib/ExecutionEngine/JIT/CMakeFiles/LLVMJIT.dir/Intercept.cpp.o] Error 1
| make[2]: Leaving directory `/media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/build'
| make[1]: *** [lib/ExecutionEngine/JIT/CMakeFiles/LLVMJIT.dir/all] Error 2
| make[1]: *** Waiting for unfinished jobs....
Quoted 3 lines
I'm using master branches.
Is this a known issue?
Any ideas how to solve?
you are using gcc 4.7 I guess. Fix is to add #include <unistd.h> in Intercept.cpp
if that works then submit it to meta-java
Quoted 8 lines
Thanks,
Jaap_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Thanks!
That helps a lot!!
Unfortunately I'm not familiar with submitting the patch... (shame on me! You may sent me a link for the howto) However this is the patch I used
diff --git a/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp
b/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp
index 274f816..a4e7eee 100644
--- a/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp
+++ b/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp
@@ -19,6 +19,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/System/DynamicLibrary.h"
#include "llvm/Config/config.h"
+#include <unistd.h>
using namespace llvm;// AtExitHandlers - List of functions to call when the program exits,
Thanks again,
Jaap
Quoted 36 lines · Khem Raj
Quoted 17 lines · Jaap de Jong
Hi all,
trying to compile openjdk-6, it fails with:
| /media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp:
In constructor '{anonymous}::StatSymbols::StatSymbols()':
| /media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp:69:67:
error: 'lseek64' was not declared in this scope
| make[2]: ***
[lib/ExecutionEngine/JIT/CMakeFiles/LLVMJIT.dir/Intercept.cpp.o] Error 1
| make[2]: Leaving directory `/media/OpenEmbedded/oe-core/build/tmp-angstrom_2010_x-eglibc/work/armv5te-angstrom-linux-gnueabi/llvm2.8-2.8-r0/llvm-2.8/build'
| make[1]: *** [lib/ExecutionEngine/JIT/CMakeFiles/LLVMJIT.dir/all] Error 2
| make[1]: *** Waiting for unfinished jobs....Quoted 3 lines
I'm using master branches.
Is this a known issue?
Any ideas how to solve?you are using gcc 4.7 I guess. Fix is to add #include<unistd.h> in Intercept.cpp
if that works then submit it to meta-javaQuoted 7 lines
Thanks,
Jaap_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
PATCH 1/1 llvm2.8: fix llvm compile error by including unistd.h
Thanks to Jaap de Jong and Khem Raj for reporing the problem and suggesting the fix.
--- recipes-core/llvm/llvm2.8/add-unistd.patch | 12 ++++++++++++ recipes-core/llvm/llvm2.8_2.8.bb | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 recipes-core/llvm/llvm2.8/add-unistd.patch
recipes-core/llvm/llvm2.8/add-unistd.patch new file +12 -0
@@ -0,0 +1,12 @@ +Index: llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp +=================================================================== +--- llvm-2.8.orig/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-14 18:31:21.008318473 +0200 ++++ llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-14 18:32:53.523734850 +0200 +@@ -19,6 +19,7 @@ + #include "llvm/Support/ErrorHandling.h" + #include "llvm/System/DynamicLibrary.h" + #include "llvm/Config/config.h" ++#include <unistd.h> + using namespace llvm; + + // AtExitHandlers - List of functions to call when the program exits,
recipes-core/llvm/llvm2.8_2.8.bb +3 -0
@@ -4,9 +4,12 @@ require llvm.inc LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=0ac5f799a2d89477c75b0a378b221855" +PR = "r1" + SRC_URI += " \ file://30may-llvm2.8-pr399-ppc-arm.patch \ file://0019-issue6065.patch \ + file://add-unistd.patch \ " SRC_URI_append_arm = " file://llvm-mc_disable.patch "
Signature · 1 line
1.7.10
Re: [meta-java][PATCH] llvm2.8: fix llvm compile error by including unistd.h
Quoted 46 lines · Jan Luebbe
Thanks to Jaap de Jong and Khem Raj for reporing the problem and suggesting the fix.
Signed-off-by Jan Luebbe <[email protected]>--- recipes-core/llvm/llvm2.8/add-unistd.patch | 12 ++++++++++++ recipes-core/llvm/llvm2.8_2.8.bb | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 recipes-core/llvm/llvm2.8/add-unistd.patchrecipes-core/llvm/llvm2.8/add-unistd.patch new file +12
-0@@ -0,0 +1,12 @@ +Index: llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp +=================================================================== +--- llvm-2.8.orig/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-14 18:31:21.008318473 +0200 ++++ llvm-2.8/lib/ExecutionEngine/JIT/Intercept.cpp 2012-05-14 18:32:53.523734850 +0200 +@@ -19,6 +19,7 @@ + #include "llvm/Support/ErrorHandling.h" + #include "llvm/System/DynamicLibrary.h" + #include "llvm/Config/config.h" ++#include <unistd.h> + using namespace llvm; + + // AtExitHandlers - List of functions to call when the program exits,recipes-core/llvm/llvm2.8_2.8.bb +3
-0@@ -4,9 +4,12 @@ require llvm.inc LICENSE = "NCSA" LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=0ac5f799a2d89477c75b0a378b221855" +PR = "r1" + SRC_URI += " \ file://30may-llvm2.8-pr399-ppc-arm.patch \ file://0019-issue6065.patch \ + file://add-unistd.patch \ " SRC_URI_append_arm = " file://llvm-mc_disable.patch "Signature · 1 line
1.7.10
Thanks for the patch, it was applied to meta-java master and jdk-7 branch.
Bye Henning