Closed Bug 1225753 Opened 9 years ago Closed 8 years ago

prefix is set to ac_default_prefix too late

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox44 affected, firefox45 affected, firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox44 --- affected
firefox45 --- affected
firefox46 --- fixed

People

(Reporter: gaston, Assigned: gaston)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 1224490 broke linking on OpenBSD, MOZ_FIX_LINK_PATHS ends up with -rpath-link,NONE/lib because prefix isnt set. Previously it defaulted to usr/local correctly.

Now when linking, all the libs which should be looked for in usr/local/lib arent found and ld fails.

Looking at the generated configure file, 

6829 MOZ_FIX_LINK_PATHS="-Wl,-rpath-link,${DIST}/bin -Wl,-rpath-link,${prefix}/lib"
30075 test "x$prefix" = xNONE && prefix=$ac_default_prefix

That cant work.
Blocks: 1224490
This now affects aurora too, i work it around by adding --prefix=/usr/local to my .mozconfig but this doesnt feel right.

Mike, on linux how are the depending libs found when linking tests with libxul.so ? /usr/lib is in -L by accident ? The values from pkg-config --libs arent stripped the same ? Here it really seems that mozbuild is doing too much reordering/stripping... and the depending paths are not written in libxul.so.


 Which way should i dig to fix this properly ?
Flags: needinfo?(mh+mozilla)
Just move things such that prefix is set earlier.
Flags: needinfo?(mh+mozilla)
remote: View your changes here:
remote:   https://hg.mozilla.org/try/rev/f59a443dc541
remote:   https://hg.mozilla.org/try/rev/adf8b69c7eb0
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=adf8b69c7eb0
Attached patch Move prefix default init earlier (obsolete) — Splinter Review
Try was green, so let's risk it...
Assignee: nobody → landry
Attachment #8700764 - Flags: review?(mh+mozilla)
Comment on attachment 8700764 [details] [diff] [review]
Move prefix default init earlier

Review of attachment 8700764 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +936,5 @@
>  MOZ_USER_DIR=".mozilla"
>  
> +test "x$prefix" = xNONE && prefix=$ac_default_prefix
> +# Let make expand exec_prefix.
> +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

That's quite a random place to move it to. It would be better even earlier. Also, you're effectively removing it from js/src/configure, since you're moving it from a build/autoconf/*.m4 file to top-level configure.in. It would be better move to AC_INIT_PREPARE in build/autoconf/hooks.m4.
Attachment #8700764 - Flags: review?(mh+mozilla) → review-
(In reply to Mike Hommey [:glandium] from comment #6)
> Comment on attachment 8700764 [details] [diff] [review]
> Move prefix default init earlier
> 
> Review of attachment 8700764 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: configure.in
> @@ +936,5 @@
> >  MOZ_USER_DIR=".mozilla"
> >  
> > +test "x$prefix" = xNONE && prefix=$ac_default_prefix
> > +# Let make expand exec_prefix.
> > +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
> 
> That's quite a random place to move it to. It would be better even earlier.
> Also, you're effectively removing it from js/src/configure, since you're
> moving it from a build/autoconf/*.m4 file to top-level configure.in. It
> would be better move to AC_INIT_PREPARE in build/autoconf/hooks.m4.

You could have said that right from the start instead of just 'move it earlier' :)
With this, prefix is set to ac_default_prefix in line 1145 in the generated configure, which is 5000 lines earlier than my previous patch.
Attachment #8700764 - Attachment is obsolete: true
Attachment #8701369 - Flags: review?(mh+mozilla)
Attachment #8701369 - Flags: review?(mh+mozilla) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fcdaa7c034f4
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: