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

(lib)clang is needed #5

Closed
kenz-gelsoft opened this issue Apr 11, 2023 · 5 comments
Closed

(lib)clang is needed #5

kenz-gelsoft opened this issue Apr 11, 2023 · 5 comments

Comments

@kenz-gelsoft
Copy link
Owner

checking for cbindgen... /bin/cbindgen
checking for rustfmt... /bin/rustfmt
checking for clang for bindgen... not found
checking for libclang for bindgen... not found
ERROR: Could not find clang to generate run bindings for C/C++. Please install the necessary packages, run `mach bootstrap`, or use --with-clang-path to give the location of clang.
~/src/firefox-102.9.0/obj-x86_64-unknown-haiku> 
@kenz-gelsoft
Copy link
Owner Author

Installing llvm12_clang from Haiku Depot

@kenz-gelsoft
Copy link
Owner Author

clang found, but libclang is not found.

checking for cbindgen... /bin/cbindgen
checking for rustfmt... /bin/rustfmt
checking for clang for bindgen... /bin/clang++
checking for libclang for bindgen... not found
ERROR: Could not find libclang to generate rust bindings for C/C++. Please install the necessary packages, run `mach bootstrap`, or use --with-libclang-path to give the path containing it.
~/src/firefox-102.9.0/obj-x86_64-unknown-haiku> 

@kenz-gelsoft
Copy link
Owner Author

Trying install llvm12_clang_analysis package.

I don't know this contains libclang or not.

@kenz-gelsoft
Copy link
Owner Author

already installed, but not found

~/src/firefox-102.9.0/obj-x86_64-unknown-haiku> ls /system/lib/libclang*
/system/lib/libclang-cpp.so  /system/lib/libclang-cpp.so.12  /system/lib/libclang.so.12

@kenz-gelsoft
Copy link
Owner Author

detection code was OS dependant, fixed by

diff --git a/build/moz.configure/bindgen.configure b/build/moz.configure/bindgen.configure
index 2194e732d5..2a77385f59 100644
--- a/build/moz.configure/bindgen.configure
+++ b/build/moz.configure/bindgen.configure
@@ -22,7 +22,7 @@ option(env="CBINDGEN", nargs=1, when=cbindgen_is_needed, help="Path to cbindgen"
 def check_cbindgen_version(cbindgen, fatal=False):
     log.debug("trying cbindgen: %s" % cbindgen)
 
-    cbindgen_min_version = Version("0.23.0")
+    cbindgen_min_version = Version("0.20.0")#Version("0.23.0")
 
     # cbindgen x.y.z
     version = Version(check_cmd_output(cbindgen, "--version").strip().split(" ")[1])
@@ -205,7 +205,7 @@ def bindgen_libclang_path(libclang_path, clang, library_name_info, host):
     libclang_choices.append(
         "%sclang%s" % (library_name_info.dll.prefix, library_name_info.dll.suffix)
     )
-    if host.kernel == "Linux":
+    if host.kernel == "Linux" or host.kernel == "Haiku":
         libclang_choices.append("libclang.so.*")
 
     if host.os == "OpenBSD":

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

No branches or pull requests

1 participant