scons: Allow pkg-config to fail and continue
Review Request #1615 - Created Jan. 7, 2013 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9464:b308039c9674 --------------------------- scons: Allow pkg-config to fail and continue This patch changes the use of pkg-config such that protobuf is disabled if the call to pkg-config is not successful.
Posted (Jan. 8, 2013, 4:26 a.m.)
Andreas, this patch works for me. I think we should not exit scons in any of the the cases related to protocol-buffers. If any thing that protocol-buffers requires is not available, we should print a warning, and proceed ahead with the rest of the compilation.
Review request changed
Updated (Jan. 9, 2013, 1:18 a.m.)
Description: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+21 -11) |
Posted (Jan. 9, 2013, 1:30 a.m.)
-
SConstruct (Diff revision 2) -
main['PROTOC'] = False?
Posted (Jan. 9, 2013, 1:34 a.m.)
-
SConstruct (Diff revision 2) -
No, it remains True, and thanks to that we do the CheckLib later and then decide if we got both or not. If we set PROTOC to False here then someone with a setup like Nilay (no pkg-config, but protobuf in the normal include and library path) would not be able to use it.
Posted (Jan. 9, 2013, 7:37 a.m.)
Some thing is wrong with this new version. Here is what I got --
scons: Reading SConscript files ...
Package protobuf was not found in the pkg-config search path.
Perhaps you should add the directory containing `protobuf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'protobuf' found
Warning: pkg-config could not get protobuf flags.
Checking for leading underscore in global variables...(cached) no
Checking for C header file Python.h... (cached) yes
Checking for C library pthread... (cached) yes
Checking for C library dl... (cached) yes
Checking for C library util... (cached) yes
Checking for C library m... (cached) yes
Checking for C library python2.6... (cached) yes
Checking for accept(0,0,0) in C++ library None... (cached) yes
Checking for zlibVersion() in C++ library z... (cached) yes
Checking for GOOGLE_PROTOBUF_VERIFY_VERSION in C++ library protobuf... no
Error: did not find protocol buffer library and/or headers.
Please install libprotobuf-dev and try again.
Review request changed
Updated (Jan. 13, 2013, 6:42 p.m.)
Description: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+27 -15) |
Posted (Jan. 14, 2013, 4:40 a.m.)
This works for me now, and the warnings are big and yellow, hard to miss. Thanks!
-
SConstruct (Diff revision 3) -
Other instances of the coloring here use "+ termcap.Normal". Should it be the same here?
Posted (Jan. 14, 2013, 7:07 a.m.)
-
SConstruct (Diff revision 3) -
I figured the concatenation done by the print is "safer", although protoc_version should always be a string. Anyone with stronger opinions on the Python style guide?
