You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This uses the correct compiler for the actual compilation; however I'm also
using env['CXXVERSION'] to selectively enable features, but this is returning
the version of the default g++ rather than the one I selected.
It looks to me like this line in g++.py...
env['CXX'] = env.Detect(compilers)
...overrides the prior setting, and it then goes on to use that value instead of
mine to determine CXXVERSION (amongst other things). The same thing happens in
gcc.py with env['CC']
Am I using the wrong method to choose a compiler? I couldn't find any reference
to this in the documentation, but I'd think it's a fairly common requirement.
Either way, shouldn't gcc.py and g++.py honour any pre-set value of CC/CXX?
Thanks
Ben
gregnoel said at 2008-06-05 17:46:54
Bug party triage: part of revamping platform and toolchain configuration;
setting CC or CXX does not specify the compile to be selected.
gregnoel said at 2008-07-27 03:44:59
Change all toolchain issues to enhancements scheduled for future p1.
gregnoel said at 2008-11-21 16:38:26
Consolidate toolchain issues as 2.x p3.
gregnoel said at 2008-12-26 13:20:23
Adjust triage of issues.
haubi said at 2014-05-07 08:23:26
Created an attachment (id=934)
Eventually something like this patch would help here?
haubi said at 2014-05-13 01:13:55
Created an attachment (id=935)
test/CC/CCVERSION.py to test for proper CCVERSION variable
haubi said at 2014-05-13 01:20:39
Created an attachment (id=936)
test/CXX/CXXVERSION.py to test for proper CXXVERSION variable
haubi said at 2014-05-13 01:23:45
Erm, attachment#934 leads test/CC/CC.py to hang on AIX.
Ok then, attachment#935 and attachment#936 are testcases for this bug.
haubi said at 2014-05-13 04:23:01
Provided as pull-request#137.
haubi said at 2014-05-15 01:25:58
Re-submitted as pull-request#138.
dirkbaechle said at 2014-05-18 10:37:49
*** Issue 2016 has been marked as a duplicate of this issue. ***
j_ff said at 2016-01-31 12:42:04
Please can give someone a statment about this bug?
Many thanks
Jörg Frings-Fürst
Maintainer of scons at Debian
bdbaddog said at 2016-01-31 13:48:05
Fixed in SCons 2.3.2
Merged to default branch on : 2014-05-18
Prior to this commit, builds of `pkgsCross.*.gpsd` were failing.
`gpsd` expects `CCVERSION` to be set, and fails if it is not set.
Scons does not guarantee that `CCVERSION` will be set, nor does it
specify under what circumstances it will or will not be set: "This may
or may not be set, depending on the specific C compiler being used."
https://scons.org/doc/production/HTML/scons-man.html#cv-CCVERSION
Apparently cross-compilation triggers one of those unspecified
circumstances. There are several bug reports to scons relating to
this:
SCons/scons#1723https://github.com/SCons/scons/issues?q=is%3Aissue+ccversion+is%3Aclosed
`gpsd` does not use `CCVERSION` for any purpose other than printing a
log message at the start of the build:
https://gitlab.com/gpsd/gpsd/-/commit/d0558636038e18d90eb886f668ff5004538f7839
This commit modifies the log message, replacing `env['CCVERSION']`
with `env['CC']`, since `CC` is always set when using nixpkgs'
standard builder.
With this commit, `pkgsCross.mips64el-linux-gnuabi64.gpsd` and
`pkgsCross.powernv.gpsd` build correctly on x86_64. Prior to this
commit, they would fail with:
```
scons: Reading SConscript files ...
scons version: 4.1.0
scons is running under Python version: 3.10.5.final.0
gpsd version: 3.23.1
This system is: linux
KeyError: 'CCVERSION':
File "/build/gpsd-3.23.1/SConstruct", line 69:
SConscript('SConscript',
File "/nix/store/0vmqv6f2s8bj2a50gk8g05jcb5scnifb-scons-4.1.0/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 654:
return method(*args, **kw)
File "/nix/store/0vmqv6f2s8bj2a50gk8g05jcb5scnifb-scons-4.1.0/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 591:
return _SConscript(self.fs, *files, **subst_kw)
File "/nix/store/0vmqv6f2s8bj2a50gk8g05jcb5scnifb-scons-4.1.0/lib/python3.10/site-packages/SCons/Script/SConscript.py", line 280:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "/build/gpsd-3.23.1/gpsd-3.23.1/SConscript", line 883:
announce("cc is %s, version %s" % (env['CC'], env['CCVERSION']))
File "/nix/store/0vmqv6f2s8bj2a50gk8g05jcb5scnifb-scons-4.1.0/lib/python3.10/site-packages/SCons/Environment.py", line 388:
return self._dict[key]
```
This issue was originally created at: 2007-09-04 08:58:58.
This issue was reported by:
quaestor
.quaestor said at 2007-09-04 08:58:58
gregnoel said at 2008-06-05 17:46:54
gregnoel said at 2008-07-27 03:44:59
gregnoel said at 2008-11-21 16:38:26
gregnoel said at 2008-12-26 13:20:23
haubi said at 2014-05-07 08:23:26
haubi said at 2014-05-13 01:13:55
haubi said at 2014-05-13 01:20:39
haubi said at 2014-05-13 01:23:45
haubi said at 2014-05-13 04:23:01
haubi said at 2014-05-15 01:25:58
dirkbaechle said at 2014-05-18 10:37:49
j_ff said at 2016-01-31 12:42:04
bdbaddog said at 2016-01-31 13:48:05
haubi attached scons-issue1723.diff at 2014-05-07 08:23:26.
haubi attached CCVERSION.py at 2014-05-13 01:13:55.
haubi attached CXXVERSION.py at 2014-05-13 01:20:38.
dirkbaechle said this issue is duplicated by #2016 at 2014-05-18 10:37:49.
The text was updated successfully, but these errors were encountered: