Closed Bug 1552476 Opened 5 years ago Closed 5 years ago

Local windows build is broken (libclang.dll is too old)

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: kats, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Guessing this is a regression from bug 1551618:

 0:10.79 checking for llvm-config... c:/Users/kats/.mozbuild/clang/bin/llvm-config.exe
 0:11.05 checking that libclang is new enough...
 0:11.05 ERROR: The libclang located at c:/Users/kats/.mozbuild/clang/bin\libclang.dll is too old (need at least 4.0).
 0:11.05 Please make sure to update it or point to a newer libclang using
 0:11.05 --with-libclang-path.
 0:11.13 *** Fix above errors and then restart with\
 0:11.13                "./mach build"
 0:11.13 mozmake.EXE: *** [client.mk:115: configure] Error 1

Running mach bootstrap doesn't update the clang because Cache matches, avoiding extracting in 'c:\Users\kats\.mozbuild\clang'

The actual exception being thrown is this:

 0:10.31 Traceback (most recent call last):
 0:10.31   File "c:/Users/kats/zspace/gecko-misc/build/moz.configure/bindgen.configure", line 281, in min_libclang_version
 0:10.31     lib = CDLL(libclang)
 0:10.31   File "c:\mozilla-build\python\Lib\ctypes\__init__.py", line 362, in __init__
 0:10.31     self._handle = _dlopen(self._name, mode)
 0:10.31 TypeError: LoadLibrary() argument 1 must be string, not unicode

Woo python!

Passing libclang.encode('ascii', 'replace') to CDLL fixed it for me locally. Dunno if that's a good solution though.

(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #1)

The actual exception being thrown is this:

 0:10.31 Traceback (most recent call last):
 0:10.31   File "c:/Users/kats/zspace/gecko-misc/build/moz.configure/bindgen.configure", line 281, in min_libclang_version
 0:10.31     lib = CDLL(libclang)
 0:10.31   File "c:\mozilla-build\python\Lib\ctypes\__init__.py", line 362, in __init__
 0:10.31     self._handle = _dlopen(self._name, mode)
 0:10.31 TypeError: LoadLibrary() argument 1 must be string, not unicode

wow wat.

(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)

Passing libclang.encode('ascii', 'replace') to CDLL fixed it for me locally. Dunno if that's a good solution though.

I think just str(libclang) should do.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

I think just str(libclang) should do.

I tried that first but it didn't work

Huh, how not? Did it fail the same way?

Apparently it doesn't deal very well with unicode objects.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a18f289abc5d
Ensure we pass a string to CDLL on Windows. r=froydnj
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → emilio
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: