tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mongodb3 fails to build after update, contains SSPL code



[For others, this is turning out to be about the intricacies of scons.
Someday, it would be nice to have first-class support for scons in
pkgsrc, assuming we get there before everyone stops usin it.]


Adam Ciarciński <adam%NetBSD.org@localhost> writes:

>> But the problem is not the version.  See the config.log I sent, which
>> shows the error message about an invalid content to the -O flag, and a
>> single quoted argument (starting with -O2) with multiple flags, which I
>> think are interpeted as part of the argument to -O.
>
> Then, your CXXFLAGS are quoted somewhere: "-O2 -D_FORTIFY_SOURCE=2
> -pthread -I/usr/pkg/include -I/usr/include". SCons thinks the whole "2
> -D_FORTIFY_SOURCE=2 -pthread -I/usr/pkg/include -I/usr/include" is a
> value for -O. :)

Yes, I figured out that much.  But I am just typing make with unmodified
pkgsrc on netbsd-8, which by definition works for working packages, so I
am viewing this as a bug in the package.

In the package directory:

  $ make show-vars VARNAMES=CXXFLAGS
  -O2 -D_FORTIFY_SOURCE=2

which does not show spurious quotes.  I see reasonable values for CFLAGS
and CPPFLAGS, matching in the pre-update and post-update versions.
Looking at PKG_DEBUG_LEVEL=1 output, I see CXXFLAGS being passed to
scons in the environment and on the command line.  But in both cases, it
looks like

  CXXFLAGS=-O2\ -D_FORTIFY_SOURCE=2\ -pthread\ -I/usr/pkg/include\ -I/usr/include

with no quotes, just \ form :Q in make.

Diffing the update, I see a rototill of the method of dealing with
compile/linker flags and scons.  Was that necessary to get the new
version to build, or just something that seemed like progress?   The
previous version has a patch to SConstruct that respects CXXFLAGS in the
environment, so I don't understand why passing it on the command-line
too is done.  

Removing CXXFLAGS from the scons build results in getting past the
configure test.

Can you explain the theory of passing CXXFLAGS in the environment vs the
command line, which is preferred for scons, and why the package has the
current form?


Also, I see that do-test: was removed.  I realize that this didn't work
because upstream had previously removed the file that was called.  But,
please note such packaging changes in commit messages.



Have you been able to build the package on netbsd-8?

What platforms did you build it on, and what is in config.log on those?
Does this quoting issue not happen somehow?


This package has to build on netbsd-8, so we need a way forward (in a
week, ish) to restore that.



Home | Main Index | Thread Index | Old Index