Skip to contentSkip to conversation

llvm fails to build

PATCH In review Jaap de Jong 4 participants 5 messages May 3, 2012 – Jun 1, 2012

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
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

#2 lore raw

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-java

Quoted 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

#3 lore raw

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
new file mode 100644
index 0000000..1c51b30
@@ -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
index 310e94e..3459885 100644
@@ -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
#4 lore raw

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.

---
 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
new file mode 100644
index 0000000..1c51b30
@@ -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
index 310e94e..3459885 100644
@@ -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