Closed Bug 1283678 Opened 3 years ago Closed 3 years ago

MSVC VS2015u2: memory\jemalloc\src> configure: error: Cannot build without ffsl(3) or __builtin_ffsl()

Categories

(Firefox Build System :: General, defect, critical)

49 Branch
Unspecified
Windows
defect
Not set
critical

Tracking

(firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: jgilbert, Assigned: froydnj)

References

Details

Attachments

(3 files, 2 obsolete files)

Flags: needinfo?(nfroyd)
Attachment #8766996 - Flags: feedback?(nfroyd)
Some more information on the problem, like a log from configure, would be really helpful.  Your patch stops exporting CFLAGS to the libffi subconfigure in the cross-compile case, which isn't going to fly.

It's extremely odd this patch breaks anything, because:

- you're not using clang-cl
- you're not compiling for arm
- you're not cross-compiling (I assume?)

and I think other people have compiled successfully with 2015u2 and beyond....
Flags: needinfo?(nfroyd)
Attachment #8766996 - Flags: feedback?(nfroyd)
(In reply to Nathan Froyd [:froydnj] from comment #2)
> Some more information on the problem, like a log from configure, would be
> really helpful.  Your patch stops exporting CFLAGS to the libffi
> subconfigure in the cross-compile case, which isn't going to fly.
> 
> It's extremely odd this patch breaks anything, because:
> 
> - you're not using clang-cl
> - you're not compiling for arm
> - you're not cross-compiling (I assume?)
> 
> and I think other people have compiled successfully with 2015u2 and
> beyond....

automation builds successfully with 2015u2...
Attachment #8766996 - Flags: review?(mh+mozilla)
Attached file failed build log
Can you provide the config.log from jemalloc's configure?

Did you change anything in your MSVC installation lately?
Comment on attachment 8766996 [details]
Bug 1283678 - Reset CFLAGS ASAP. -

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/61710/diff/1-2/
Attachment #8766996 - Attachment description: Bug 1283678 - Use new variable for exported CFLAGS. - → Bug 1283678 - Reset CFLAGS ASAP. -
Attachment #8766996 - Flags: review?(mh+mozilla)
Attached file jemalloc config.log
The problem here is that we:

1. Saved CFLAGS;
2. Modified CFLAGS in certain circumstances;
3. Exported CFLAGS if we were cross-compiling;
4. [MSVC only] Nulled out CFLAGS
5. Ran the subconfigure;
6. Restored CFLAGS from step 1.

Notice that on MSVC, CFLAGS now reflects the CFLAGS we had before
running the libffi subconfigure, rather than the cleared CFLAGS we had
before the -no-integrated-as patch landed.

It's not clear to me why this is a problem for jgilbert only and not for
our automation (which also runs MSVC 2015u2).  We obviously have some
sort of problem in the way our exporting of variables works across .m4
files and the like.  Nevertheless, this fix at least gets us back to a
state where we are no worse than when the -no-integrated-as patch
landed.  Passing variables via configure args is cleaner than passing
them in the environment in any event.

jgilbert confirms that the patch works for him; I can confirm the patch does
the right thing for a clang/android build.  It ought to work for our normal
gcc/android builds as well.
Attachment #8767318 - Flags: review?(mh+mozilla)
Attachment #8766996 - Attachment is obsolete: true
Attachment #8766996 - Flags: review?(mh+mozilla)
...and of course this breaks the world on Android builds with inscrutable errors like:

https://treeherder.mozilla.org/logviewer.html#?job_id=23260212&repo=try#L1819

I'll try to have a look with a local build next week.
Works better if you pass in the correct variables. :)
Attachment #8767377 - Flags: review?(mh+mozilla)
Attachment #8767318 - Attachment is obsolete: true
Attachment #8767318 - Flags: review?(mh+mozilla)
Attachment #8767377 - Flags: review?(mh+mozilla) → review+
Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/879d2cba0b03
pass variables to libffi's subconfigure directly rather than exporting them; r=glandium
Assignee: nobody → nfroyd
https://hg.mozilla.org/mozilla-central/rev/879d2cba0b03
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
I'm getting this again.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 1262155
See Also: → 1304869
I filed bug 1304869 to track this new instance.
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.