Skip to contentSkip to conversation

package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

PATCH New Joseph Kogut 4 participants 9 messages Mar 16, 2020 – Mar 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

---
 package/llvm/llvm.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/llvm/llvm.mk +2 -1
index 28ad6a5704..f1034f0365 100644
@@ -193,7 +193,8 @@ LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 # check preventively. Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
 	-DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-	-DOCAMLFIND=OCAMLFIND-NOTFOUND
+	-DOCAMLFIND=OCAMLFIND-NOTFOUND \
+	-DLLVM_ENABLE_BINDINGS=OFF
 
 # Builds a release host tablegen that gets used during the LLVM build.
 HOST_LLVM_CONF_OPTS += -DLLVM_OPTIMIZED_TABLEGEN=ON
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 package/llvm: remove outdated variables disabling bindings

LLVM no longer disables unsupported bindings by overriding OCAMLFIND and GO_EXECUTABLE, so remove them.

---
 package/llvm/llvm.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/llvm/llvm.mk +1 -4
index f1034f0365..24d033d124 100644
@@ -189,11 +189,8 @@ LLVM_CONF_OPTS += -DLLVM_DEFAULT_TARGET_TRIPLE=$(GNU_TARGET_NAME)
 # This solves "No available targets are compatible for this triple" with llvmpipe
 LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 
-# The Go bindings have no CMake rules at the moment, but better remove the
-# check preventively. Building the Go and OCaml bindings is yet unsupported.
+# Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
-	-DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-	-DOCAMLFIND=OCAMLFIND-NOTFOUND \
 	-DLLVM_ENABLE_BINDINGS=OFF
 
 # Builds a release host tablegen that gets used during the LLVM build.
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/2 package/llvm: remove outdated variables disabling bindings

Hi Joseph,

Le 16/03/2020 ? 21:01, Joseph Kogut a ?crit?:

Quoted 13 lines

LLVM no longer disables unsupported bindings by overriding OCAMLFIND and GO_EXECUTABLE, so remove them.

---
 package/llvm/llvm.mk | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
package/llvm/llvm.mk +0 -0
index f1034f0365..24d033d124 100644

package/llvm/llvm.mk LLVM_CONF_OPTS += -DLLVM_DEFAULT_TARGET_TRIPLE=$(GNU_TARGET_NAME) · line 194

Quoted 10 lines
package/llvm/llvm.mk +1 -4
@@ -189,11 +189,8 @@ LLVM_CONF_OPTS += -DLLVM_DEFAULT_TARGET_TRIPLE=$(GNU_TARGET_NAME)
 # This solves "No available targets are compatible for this triple" with llvmpipe
 LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 
-# The Go bindings have no CMake rules at the moment, but better remove the
-# check preventively. Building the Go and OCaml bindings is yet unsupported.
+# Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
-	-DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-	-DOCAMLFIND=OCAMLFIND-NOTFOUND \
 	-DLLVM_ENABLE_BINDINGS=OFF

Best regards,
Romain

Quoted 3 lines
package/llvm/llvm.mk +0 -0
 # Builds a release host tablegen that gets used during the LLVM build.
 
#3 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

In reply to Joseph Kogut

Hi Joseph,

Le 16/03/2020 ? 21:01, Joseph Kogut a ?crit?:

Quoted 8 lines

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Quoted 8 lines

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

My autobuilder doesn't have ocaml libraries installed, maybe I can install them to trigger the issue.

Best regards,
Romain

Quoted 21 lines
---
 package/llvm/llvm.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/llvm/llvm.mk +2 -1
index 28ad6a5704..f1034f0365 100644
@@ -193,7 +193,8 @@ LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 # check preventively. Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
 	-DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-	-DOCAMLFIND=OCAMLFIND-NOTFOUND
+	-DOCAMLFIND=OCAMLFIND-NOTFOUND \
+	-DLLVM_ENABLE_BINDINGS=OFF
 
 # Builds a release host tablegen that gets used during the LLVM build.
 HOST_LLVM_CONF_OPTS += -DLLVM_OPTIMIZED_TABLEGEN=ON
#4 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

Hi Romain,

Quoted 17 lines · Romain Naour

Hi Joseph,

Le 16/03/2020 ? 21:01, Joseph Kogut a ?crit :

Quoted 13 lines

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Quoted 7 lines
Quoted 3 lines

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

My autobuilder doesn't have ocaml libraries installed, maybe I can install them to trigger the issue.

That would be great. I did check the autobuilders to see if this was a known issue, and didn't find any build problems but timeouts for LLVM.

Quoted 28 lines

Best regards,
Romain

Quoted 21 lines
---
 package/llvm/llvm.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/llvm/llvm.mk +2 -1
index 28ad6a5704..f1034f0365 100644
@@ -193,7 +193,8 @@ LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 # check preventively. Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
      -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-     -DOCAMLFIND=OCAMLFIND-NOTFOUND
+     -DOCAMLFIND=OCAMLFIND-NOTFOUND \
+     -DLLVM_ENABLE_BINDINGS=OFF
 
 # Builds a release host tablegen that gets used during the LLVM build.
 HOST_LLVM_CONF_OPTS += -DLLVM_OPTIMIZED_TABLEGEN=ON
#5 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

Hi Joseph,

Le 18/03/2020 ? 01:27, Joseph Kogut a ?crit?:

Quoted 24 lines

Hi Romain,

Quoted 21 lines · Romain Naour

Hi Joseph,

Le 16/03/2020 ? 21:01, Joseph Kogut a ?crit :

Quoted 16 lines

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

Quoted 6 lines
Quoted 3 lines

My autobuilder doesn't have ocaml libraries installed, maybe I can install them to trigger the issue.

That would be great. I did check the autobuilders to see if this was a known issue, and didn't find any build problems but timeouts for LLVM.

Actually, the issue can't be trigged on the Fedora distribution since there is no ocaml-ctype package [1]. Event with Fedora 30/31 ocaml bindings are automatically disabled while configuring llvm:

"OCaml bindings disabled, need ctypes >=0.4."

[1] https://lists.fedoraproject.org/pipermail/devel/2015-March/208677.html

Best regards,
Romain

Quoted 32 lines
Quoted 32 lines

Best regards,
Romain

Quoted 21 lines
---
 package/llvm/llvm.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/llvm/llvm.mk +2 -1
index 28ad6a5704..f1034f0365 100644
@@ -193,7 +193,8 @@ LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 # check preventively. Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
      -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-     -DOCAMLFIND=OCAMLFIND-NOTFOUND
+     -DOCAMLFIND=OCAMLFIND-NOTFOUND \
+     -DLLVM_ENABLE_BINDINGS=OFF
 
 # Builds a release host tablegen that gets used during the LLVM build.
 HOST_LLVM_CONF_OPTS += -DLLVM_OPTIMIZED_TABLEGEN=ON
#6 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

Hi Romain,

Quoted 32 lines · Romain Naour

Hi Joseph,

Le 18/03/2020 ? 01:27, Joseph Kogut a ?crit :

Quoted 28 lines

Hi Romain,

Quoted 24 lines · Romain Naour

Hi Joseph,

Le 16/03/2020 ? 21:01, Joseph Kogut a ?crit :

Quoted 8 lines

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Quoted 8 lines

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

My autobuilder doesn't have ocaml libraries installed, maybe I can install them to trigger the issue.

Quoted 8 lines
Quoted 2 lines

That would be great. I did check the autobuilders to see if this was a known issue, and didn't find any build problems but timeouts for LLVM.

Actually, the issue can't be trigged on the Fedora distribution since there is no ocaml-ctype package [1]. Event with Fedora 30/31 ocaml bindings are automatically disabled while configuring llvm:

"OCaml bindings disabled, need ctypes >=0.4."

Gotcha, I'm on Arch, for the record. I might look at spinning up a new autobuilder to cover this.

Quoted 39 lines

[1] https://lists.fedoraproject.org/pipermail/devel/2015-March/208677.html

Best regards,
Romain

Quoted 32 lines
Quoted 32 lines

Best regards,
Romain

Quoted 21 lines
---
 package/llvm/llvm.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/llvm/llvm.mk +2 -1
index 28ad6a5704..f1034f0365 100644
@@ -193,7 +193,8 @@ LLVM_CONF_OPTS += -DLLVM_HOST_TRIPLE=$(GNU_TARGET_NAME)
 # check preventively. Building the Go and OCaml bindings is yet unsupported.
 HOST_LLVM_CONF_OPTS += \
      -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
-     -DOCAMLFIND=OCAMLFIND-NOTFOUND
+     -DOCAMLFIND=OCAMLFIND-NOTFOUND \
+     -DLLVM_ENABLE_BINDINGS=OFF
 
 # Builds a release host tablegen that gets used during the LLVM build.
 HOST_LLVM_CONF_OPTS += -DLLVM_OPTIMIZED_TABLEGEN=ON
#7 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

In reply to Joseph Kogut
Quoted 13 lines · On Mon, 16 Mar 2020 13:01:05 -0700 Joseph Kogut <[email protected]> wrote:

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Quoted 8 lines

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

---
 package/llvm/llvm.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, both patches applied.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 1/2 package/llvm: specify LLVM_ENABLE_BINDINGS=OFF

In reply to Joseph Kogut
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joseph" == Joseph Kogut <[email protected]> writes:

LLVM builds bindings for other languages such as Go and OCaml when the appropriate dependencies can be found. We currently don't support building these bindings in Buildroot, as they're currently unused by any package.

Building these bindings was originally disabled by overriding the dependencies with values indicating that they were not found.

Newer versions of LLVM no longer disable the OCaml bindings when overriding OCAMLFIND. Consequently, the build process attempts to install the bindings to the default location on the host of /usr/lib/ocaml/llvm, causing a permissions error and build failure.

Quoted 5 lines

Additionally, LLVM has since added the variable LLVM_ENABLE_BINDINGS to control whether bindings are enabled, so we override that to disable the bindings.

Committed to 2019.11.x and 2020.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard