>From what I can tell, there are two fundamental problems here. First, scons isn't recognizing that the actual content of enums/AddrMap.cc depends on env['USE_PYTHON'], so it thinks everything is up to date even though the files contents aren't what you'd want/expect.
Second, we're using the same .cc file in both cases. That means that we'll have .cc files which are correct for one build or the other, but just whatever the most recent build was. This isn't totally broken as long as you build one thing at a time and you don't expect to go back to the other and get a totally NULL build, but it still seems less than ideal. I'm working on a fix for the first problem since it's easier, but it wouldn't be a bad idea to consider how to fix the second. Gabe On Fri, May 5, 2017 at 4:03 PM, Paul Rosenfeld (prosenfeld) < prosenf...@micron.com> wrote: > Hello all, > > I'm encountering a somewhat strange issue with the latest gem5 master. In > a fresh build directory, I can build either gem5.opt or libgem5_opt.so, but > not one after the other. That is, when I run: > > rm -rf build > scons -j32 --without-python --with-cxx-config build/ARM/libgem5_opt.so > > Everything compiles fine. However, when I run: > > rm -rf build > scons -j32 build/ARM/gem5.opt > scons -j32 --without-python --with-cxx-config build/ARM/libgem5_opt.so > > Then I get this error: > > scons: Building targets ... > [NEW DEPS] ARM/arch/arm/generated/inc.d -> arm-deps > [ENVIRONS] arm-deps -> arm-environs > [ SHCXX] ARM/enums/AddrMap.cc -> .os > In file included from ext/pybind11/include/pybind11/pytypes.h:12:0, > from ext/pybind11/include/pybind11/cast.h:13, > from ext/pybind11/include/pybind11/attr.h:13, > from ext/pybind11/include/pybind11/pybind11.h:36, > from build/ARM/enums/AddrMap.cc:10: > ext/pybind11/include/pybind11/common.h:70:20: fatal error: Python.h: No > such file or directory > #include <Python.h> > ^ > compilation terminated. > > Now since we aren't supposed to have python in the mix in this library, I > suspect that the configure step of gem5.opt is leaving behind some things > that are getting picked up by the subsequent library build. > > if I reverse the build steps: > rm -rf build > scons -j32 --without-python --with-cxx-config build/ARM/libgem5_opt.so > scons -j32 build/ARM/gem5.opt > > Both the library and binary build OK, but when I try to run gem5.opt with > fs.py I get: > > Traceback (most recent call last): > File "<string>", line 1, in <module> > File "/proj/adg/REV/sim/prosenfeld/rhel7/gem5/src/python/importer.py", > line 80, in load_module > exec code in mod.__dict__ > File "/proj/adg/REV/sim/prosenfeld/rhel7/gem5/src/python/m5/__init__.py", > line 54, in <module> > from simulate import * > File "/proj/adg/REV/sim/prosenfeld/rhel7/gem5/src/python/importer.py", > line 80, in load_module > exec code in mod.__dict__ > File "/proj/adg/REV/sim/prosenfeld/rhel7/gem5/src/python/m5/simulate.py", > line 65, in <module> > "atomic" : objects.params.atomic, > AttributeError: 'module' object has no attribute 'atomic' > > (This does not happen with a clean build of gem5.opt; the sim works fine > if I first remove the build folder) > > I'm afraid my scons skills aren't nearly good enough to figuring out where > to look. Does anyone have any ideas? > > Thanks, > Paul > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users