r4.3.1: --prefix gone?

31 views
Skip to first unread message

gabriele balducci

unread,
Nov 14, 2019, 11:56:40 AM11/14/19
to mongodb-dev
hello

just tried to build r4.3.1 on linux and build doesn't even start with:

    ----8<----
    Checking for C header file arm_neon.h... no
    scons: done reading SConscript files.
    usage: scons [OPTION] [TARGET] ...

    SCons Error: no such option: --prefix
    ---->8----

Actually, looks like the "--prefix" option in SConstruct has been
replaced by an environment variable PREFIX. Is this intentional?


thanks a lot
ciao
gabriele

Andrew Morrow

unread,
Nov 14, 2019, 12:15:07 PM11/14/19
to mongodb-dev

Hi -

First, 4.3.1 is a development version. Are you developing against the source to fix a defect or build an enhancement? If not, and you intend to build a version of the server that you can use in production, I strongly recommend building the latest stable tag from the v4.2 branch, which is currently r4.2.1, rather than building the unstable development version.

Regarding the change of the --prefix argument into the PREFIX Variable: we are doing active development work on the build system on the master branch as part of the upcoming 4.4 release, and the changes you observe are part of that. Those changes are currently incomplete and we have not yet updated the build instructions reflect the work that has landed. Furthermore, our build and release process doesn't currently use the --prefix argument at all (though the future version will make use of PREFIX), nor do we document the behavior of that flag in the build documentation.

Could you please provide the complete SCons invocation you are trying to use, and if you intend to continue working on the master branch we can provide an analogous build command. Otherwise, please switch to the v4.2 branch and you should find that your existing SCons invocation continues to work.

Thanks,
Andrew




--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/c5c599f3-3b87-4087-a5a5-60490828dd07%40googlegroups.com.

gabriele balducci

unread,
Nov 15, 2019, 3:09:36 AM11/15/19
to mongo...@googlegroups.com
hello
thanks for taking the time to reply

> First, 4.3.1 is a development version. Are you developing against the source to fix a defect or build an enhancement? If not, and you intend to build a version of the server that >you can use in production, I strongly recommend building the latest stable tag from the v4.2 branch, which is currently r4.2.1, rather than building the unstable development >version.

I regularly maintain mongo (from git) on my machines together with a
fairly large number of other packages. In general, I assume that a
tagged commit is "in some way" "testable" and so give it a try (this
is so for almost any other package). I'll change my web checker to
report for stable tags only: thanks for letting me know.

> Regarding the change of the --prefix argument into the PREFIX Variable: we are doing active development work on the build system on the master branch as part of the >upcoming 4.4 release, and the changes you observe are part of that. Those changes are currently incomplete and we have not yet updated the build instructions reflect the work >that has landed. Furthermore, our build and release process doesn't currently use the --prefix argument at all (though the future version will make use of PREFIX), nor do we >document the behavior of that flag in the build documentation.

Actually, I find the following in building.md (r4.3.1)
----8<----
To install

$ python3 buildscripts/scons.py --prefix=/opt/mongo install
---->8----

>
> Could you please provide the complete SCons invocation you are trying to use, and if you intend to continue working on the master branch we can provide an analogous build >command. Otherwise, please switch to the v4.2 branch and you should find that your existing SCons invocation continues to work.

I appreciate your helpfulness: I can go with PREFIX; I was just
curious about the reason why such a common and widespread option as
--prefix had been dropped...

thanks a lot (and apologies for the noise)
-g

Andrew Morrow

unread,
Nov 15, 2019, 9:18:58 AM11/15/19
to mongodb-dev
On Fri, Nov 15, 2019 at 3:09 AM gabriele balducci <gbrl...@gmail.com> wrote:
hello
thanks for taking the time to reply

> First, 4.3.1 is a development version. Are you developing against the source to fix a defect or build an enhancement? If not, and you intend to build a version of the server that >you can use in production, I strongly recommend building the latest stable tag from the v4.2 branch, which is currently r4.2.1, rather than building the unstable development >version.

I regularly maintain mongo (from git) on my machines together with a
fairly large number of other packages. In general, I assume that a
tagged commit is "in some way"  "testable" and so give it a try (this
is so for almost any other package). I'll change my web checker to
report for stable tags only: thanks for letting me know.

Well, as long as you don't deploy the unstable versions (anything tagged with an odd second digit) to an environment where you will use them for real, I think there is little harm in experimenting with them. But it is up to you.

 

> Regarding the change of the --prefix argument into the PREFIX Variable: we are doing active development work on the build system on the master branch as part of the >upcoming 4.4 release, and the changes you observe are part of that. Those changes are currently incomplete and we have not yet updated the build instructions reflect the work >that has landed. Furthermore, our build and release process doesn't currently use the --prefix argument at all (though the future version will make use of PREFIX), nor do we >document the behavior of that flag in the build documentation.

Actually, I find the following in building.md (r4.3.1)
    ----8<----
    To install

        $ python3 buildscripts/scons.py --prefix=/opt/mongo install
    ---->8----

Oops! You are right. We will look into updating this. Most of the work that we are doing in the build system is flag guarded, but this change leaked. I will see about either updating the documentation, or restoring the old --prefix argument when the flag is not enabled. I've filed https://jira.mongodb.org/browse/SERVER-44649 to track that work.

 

>
> Could you please provide the complete SCons invocation you are trying to use, and if you intend to continue working on the master branch we can provide an analogous build >command. Otherwise, please switch to the v4.2 branch and you should find that your existing SCons invocation continues to work.

I appreciate your  helpfulness: I can go with PREFIX; I was just
curious about the reason why such a common and widespread option as
--prefix had been dropped...

thanks a lot (and apologies for the noise)

No apology needed!

Note that you won't find the PREFIX variable to be effective on its own, per my comment about the new build features being flag guarded above. If you would like to experiment with the new build mechanics, please reach out to me directly and I can provide some additional details.

Thanks,
Andrew

Andrew Morrow

unread,
Nov 26, 2019, 1:09:27 PM11/26/19
to mongodb-dev

Hi -

Please note that this issue has been fixed on master via https://github.com/mongodb/mongo/commit/fe1ab54ab292bbd880cb26317e3fa104fd72890c. If you pull that commit you should be able to use the --prefix flag again with the same semantics that it had previously. If you could give it a try and confirm that it fixes your issue, I'd appreciate it.

Thanks
Andrew

gabriele balducci

unread,
Dec 10, 2019, 8:26:41 AM12/10/19
to mongodb-dev


hi

On Tuesday, November 26, 2019 at 7:09:27 PM UTC+1, acm wrote:

Please note that this issue has been fixed on master via https://github.com/mongodb/mongo/commit/fe1ab54ab292bbd880cb26317e3fa104fd72890c. If you pull that commit you should be able to use the --prefix flag again with the same semantics that it had previously. If you could give it a try and confirm that it fixes your issue, I'd appreciate it.

my apologies for replying so late: I was away from work
just tried to build master with --prefix and I can confirm that fe1ab54ab292bbd880cb26317e3fa104fd72890c works fine
thanks a lot for your work
ciao
-gabriele
Reply all
Reply to author
Forward
0 new messages