Last Comment Bug 651623 - Fix SO_VERSION expansion on OpenBSD
: Fix SO_VERSION expansion on OpenBSD
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All OpenBSD
: -- normal (vote)
: mozilla6
Assigned To: Landry Breuil (:gaston)
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks: openbsdmeta
  Show dependency treegraph
 
Reported: 2011-04-20 14:10 PDT by Landry Breuil (:gaston)
Modified: 2011-04-20 23:54 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use a shell test to set DLL_SUFFIX depending on SO_VERSION in env (937 bytes, patch)
2011-04-20 14:10 PDT, Landry Breuil (:gaston)
mh+mozilla: review+
Details | Diff | Splinter Review
Use a shell test to set DLL_SUFFIX depending on SO_VERSION in env (1015 bytes, patch)
2011-04-20 14:44 PDT, Landry Breuil (:gaston)
mh+mozilla: review+
Details | Diff | Splinter Review
Use shell frag to test SO_VERSION (1014 bytes, patch)
2011-04-20 14:56 PDT, Landry Breuil (:gaston)
mh+mozilla: review+
Details | Diff | Splinter Review

Description Landry Breuil (:gaston) 2011-04-20 14:10:01 PDT
Created attachment 527373 [details] [diff] [review]
Use a shell test to set DLL_SUFFIX depending on SO_VERSION in env

Followup to https://bugzilla.mozilla.org/show_bug.cgi?id=648721, esp http://hg.mozilla.org/projects/cedar/rev/ea5232835539.

As of now, with expandlib_config.py, DLL_SUFFIX is set to normalize_suffix(".so.$(if $(SO_VERSION),$(SO_VERSION),1.0)"), which confuses it (it tries to link libxul.so with libmozalloc.a & libmozsqlite3.a, which don't exist).

The previous hack doesn't work for that case, so let's use a plain shell if in the configure.in block. Tested with SO_VERSION set to nothing, foo.bar and 23.0, for each of them DLL_SUFFIX is correctly set in mozilla-config.h/expandlib_config.py, and defaults to .so.1.0 if SO_VERSION is not set.
Comment 1 Mike Hommey [:glandium] 2011-04-20 14:32:35 PDT
Comment on attachment 527373 [details] [diff] [review]
Use a shell test to set DLL_SUFFIX depending on SO_VERSION in env

>+    if test $SO_VERSION ; then

Just a nit: for consistency, make that:
  if test "$SO_VERSION"; then

A small note about the patch itself, since you bothered creating an hg patch with a commit message, please put the bug number in the summary line, and make it concise so that it fits on one short line (for some value of short), though you can expand your thoughts on the following lines (though I don't know if it's better to leave an empty line between both, like with git, but then most people don't add notes after the summary).
Comment 2 Landry Breuil (:gaston) 2011-04-20 14:44:19 PDT
Created attachment 527389 [details] [diff] [review]
Use a shell test to set DLL_SUFFIX depending on SO_VERSION in env

New version with better commit message, and quote SO_VERSION.

I'm somewhat getting used to hg queues... and m-c builds and runs fine on OpenBSD with only 9 patches!
Comment 3 Mike Hommey [:glandium] 2011-04-20 14:49:15 PDT
Comment on attachment 527389 [details] [diff] [review]
Use a shell test to set DLL_SUFFIX depending on SO_VERSION in env

>+    if test "$SO_VERSION" ; then

without the space before the semi-colon and we're good. Thanks
Comment 4 Landry Breuil (:gaston) 2011-04-20 14:56:40 PDT
Created attachment 527394 [details] [diff] [review]
Use shell frag to test SO_VERSION
Comment 5 Mike Hommey [:glandium] 2011-04-20 23:54:37 PDT
http://hg.mozilla.org/mozilla-central/rev/a7ef81a75db7

Note You need to log in before you can comment on or make changes to this bug.