scons

Unable to runs scons getting import error

回眸只為那壹抹淺笑 提交于 2019-12-12 14:36:01
问题 I have installed scons 2.3.2 and have python 2.4. When I run scons, I am seeing the following error: scons Import failed. Unable to find SCons files in: /usr/bin/../engine /usr/bin/scons-local-2.3.2 /usr/bin/scons-local /usr/lib/scons-2.3.2 /usr/lib/scons-2.3.2 /usr/local/lib/scons-2.3.2 /usr/lib/python2.4/site-packages/scons-2.3.2 /usr/lib/python2.4/site-packages/scons-2.3.2 /usr/local/lib/python2.4/site-packages/scons-2.3.2 /usr/lib64/scons-2.3.2 /usr/lib/scons /usr/lib/scons /usr/local/lib

SCons - Headers/Libraries in a non-standard location

拈花ヽ惹草 提交于 2019-12-12 13:34:58
问题 I'm trying to use SCons to compile a program that requires a set of dependencies which I've installed in a non-standard location. I've installed the dependencies in /home/dja/ocr. Now I'm trying to compile the main program and can't figure out how to tell SCons where to look for the libraries and headers. I've tried (amongst others): scons prefix=/home/dja/ocr scons includepath=/home/dja/ocr/include libpath=/home/dja/ocr/lib env LIBPATH=/home/dja/ocr/lib INCLUDEPATH=/home/dja/ocr/include

Using SCons TryCompile to examine compiler flag support on Windows

北城余情 提交于 2019-12-12 11:49:04
问题 With GCC and clang, I've been able to use SCons 'TryCompile' feature to build a simple configure check to determine if the currently configured compiler supports a given compile flag. Basically, clone the env, add the flag in question to CFLAGS, CCFLAGS, or CXXFLAGS, as appropriate, execute TryCompile, and if the TryCompile succeeds, then the flag is supported and we can add it to the real env. This works perfectly with gcc, because unknown flags are errors and the compiler exits with a non

SCons and/or CMake: any way to automatically map from “header included during compilation” to “corresponding object file must be linked”?

久未见 提交于 2019-12-12 11:18:27
问题 Super-simple, totally boring setup: I have a directory full of .hpp and .cpp files. Some of these .cpp files need to be built into executables; naturally, these .cpp files #include some of the .hpp files in the same directory, which may then include others, etc. etc. Most of those .hpp files have corresponding .cpp files, which is to say: if some_application.cpp #includes foo.hpp, either directly or transitively, then chances are there's also a foo.cpp file that needs to be compiled and

Linking to boost through SConstruct

故事扮演 提交于 2019-12-12 09:58:23
问题 I'm trying to work on a cross-platform project that uses boost for the file/directory operations. I've been using visual studio, but in order to compile on linux, I've decided to switch to SConstruct. I cannot [correctly?] link to the filesystem library however. my SConstruct file is as follow: vLibs = [ 'libboost_system-vc100-mt-1_44.lib', 'libboost_filesystem-vc100-mt-1_44.lib']; # LIBS=vLibs, env = Environment(); env.AppendUnique(CXXFLAGS=Split("/EHsc")); env.Append(CPPPATH = ["C:\\Program

How to get SCons Install to behave the same way as build at different hierarchy levels?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:37:28
问题 My project is the following tree |-- A | `-- SConscript |-- B | `-- SConscript `-- SConstruct and I want to install A 's content into /install/A , and B 's into /install/B , I achieve this by two similar looking SConscripts called from the top SConstruct. SConstruct sets up env['INSTALL_DIR'] = '/install' and exports it. The A SConscript looks like this: Import('env') env = env.Clone( INSTALL_DIR = os.path.join(env['INSTALL_DIR'], "A")) env.Alias('install', env['INSTALL_DIR']) build_result

Examples of using SCons with knitr

别等时光非礼了梦想. 提交于 2019-12-12 02:33:47
问题 Are there minimal, or even larger, working examples of using SCons and knitr to generate reports from .Rmd files? knit ing an cleaning_session.Rmd file from the command line ( bash shell) to derive an .html file, may be done via: Rscript -e "library(knitr); knit('cleaning_session.Rmd')". In this example, Rscript and instructions are fed to a Make file: RMDFILE=test html : Rscript -e "require(knitr); require(markdown); knit('$(RMDFILE).rmd', '$(RMDFILE).md'); markdownToHTML('$(RMDFILE).md', '$

How do I build v8 on Windows?

﹥>﹥吖頭↗ 提交于 2019-12-11 19:37:42
问题 Could someone tell me how to install and build v8 on windows? I am using Windows 7 with VS 2008. 回答1: The following worked for me in VS2013: From http://gneu.org/2014/02/integrating-v8/ git clone git://github.com/v8/v8.git v8 cd v8 svn co http://gyp.googlecode.com/svn/trunk build/gyp svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@89111 third_party/python_26 svn co http://src.chromium.org/svn/trunk/deps/third_party/cygwin@231940 third_party/cygwin svn co https://src

How to pass arbitrary compiler CFLAGS with Scons from the command line without custom code?

送分小仙女□ 提交于 2019-12-11 15:45:48
问题 Is there a way to write something like: scons CFLAGS='-fsanitize=address -fsanitize=thread' which would just work with a minimal script: env = Environment() env.Program(target='main.out', source=['main.c']) without changing that script? I know how to do it by modifying the script with AddOption + env.Append(CCFLAGS but I'm wondering it it is possible without changing the code to explicitly support it. 回答1: This is not possible by design (without explicitly changing the build scripts). From

Generating libjingle VS solution and projects

二次信任 提交于 2019-12-11 13:16:13
问题 I'm trying to generate the sln and vcproj files from the checkout of libjingle svn. I set all the environment variables defined on README, but i keep getting the error: C:\src>hammer --mode=all --vsproj scons: *** No SConstruct file found. File "c:\src\libjingle\scons-local\scons-local-2.1.0\SCons\Script\Main.py", line 904, in _main In fact there's no such file, but i can't find any info on how or where to create it. Is this problem related to Python or SCons installation or is something