scons is not building when using -j option - scons

I really am not sure how to describe this issue.
Building with scons -uj4 or scons -u -j4 had always worked, but recently it just stopped working!
running scons -uj4 or scons -u -j4 will return;
scons: Entering directory `/cygdrive/c/somedir'
scons: Reading SConscript files ...
scons: done reading SConscript files.
running scons -u will display;
scons: Entering directory `/cygdrive/c/somedir'
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: target
I've spent so much time trying to figure it out, with no success.
Thanks in advance for you help :)
[EDIT]
Added more required info;
scons: script: v2.4.0.rel_2.4.0:3365:9259ea1c13d7, 2015/09/21 14:03:43, by bdbaddog on hpmicrodog
babun version 1.2.0
uname -a -> CYGWIN_NT-6.1-WOW 2.7.0(0.306/5/3) 2017-02-12 13:13 i686 Cygwin
python --version: Python 2.7.12
Some Sconscript optimisation...
....
AddOption('--optimise', dest='optimised', default=False, action='store_true', help='Optimise Win32 Build')
....
env.SetOption('implicit_cache', 1)
env.SetOption('max_drift', 5)
env.Decider('MD5-timestamp')
I Added some breakpoints in scons-2.4.0\SCons\Script\Main.py and found out that scons is crashing here: Job.py(365)init()
self.tp = ThreadPool(num, stack_size, self.interrupted)

Turns out this issue (not being able to parallel build with -j option) has nothing to do with Scons, it was caused by the company's antivirus, Trend Micro.
For some reason, Trend Micro does not allow cygwin's python to create any sub-processes! Currently, since Trend Micro is company policy (not allowed to uninstall) the work around is to use uninstall cygwin python and use Windows Python (or Anaconda). Others opted to use a Virtual Machine...
Thank you all.

Related

WSL + Scons: No such file or directory

I'm using WSL and SCons for cross compiling with arm-none-eabi-gcc. When I try to build I get: "scons: *** [target] No such file or directory", where "target" is the name of the object file to build. The same build is working on our build machine (Arch Linux) and if I compile manually it also work fine. So obviously SCons can't find the source code, but why?
I suspect that scons is not able to find 'sh' rather than the object file. Make sure that you aren't editing env['PATH'] anywhere in your build scripts?

Unable to get python include path python executable for GalSim

I am trying to install (update) my local version of GalSim software on Ubuntu 14.04 by running SCons. I have all the dependencies (boost, TMV etc.) installed and have used it for quite a while now. I use Python2.7. But now, when I run scons from the terminal, I get the following error:
scons: Reading SConscript files ...
SCons is version 2.3.0 using python version 2.7.6
Python is from /usr/include/python
Using the following (non-default) scons options:
PYPREFIX = /usr/lib/python2.7/dist-packages/
TMV_DIR = /media/arunkannawadi/Acads_CMU/Cosmology/WFIRST_Project/tmv0.72/
These can be edited directly in the file gs_scons.conf.
Type scons -h for a full list of available options.
Using python = /usr/bin/python
Using compiler: /usr/bin/g++
compiler version: 4.8.2
Determined that a good number of jobs = 4
Checking for C++ header file fftw3.h... yes
Checking for correct FFTW linkage... yes
Checking for boost header files... yes
Boost version is 1.54.0
Checking for C++ header file TMV.h... yes
TMV version is 0.72
Using TMV_LINK file: /media/arunkannawadi/Acads_CMU/Cosmology /WFIRST_Project/tmv0.72/share/tmv-link
-ltmv -lblas -lgfortran -lpthread -fopenmp
Checking for correct TMV linkage... (this may take a little while)
Checking for correct TMV linkage... yes
Checking if we can build against Python...
Unable to get python include path python executable:
/usr/bin/python
Please fix the above error(s) and rerun scons.
Note: you may want to look through the file INSTALL.md for advice.
Also, if you are having trouble, please check the INSTALL FAQ at
https://github.com/GalSim-developers/GalSim/wiki/Installation%20FAQ
The output of which python is /usr/bin/python and the output of python --version is Python 2.7.6.
Upon further investigation, this question is not about GalSim per se, but rather points out an oddity of later Ubuntu versions.
After going over the config.log file from the failed installation (not posted here), it became apparent that the tests of the installation were passing, but there was a failure in parsing the outputs of those tests. The error message was
sh: 1: Syntax error: Bad fd number
A search pointed me to this other question about that error message:
sh: Syntax error: Bad fd number
which points out that that in Ubuntu 11.x /bin/sh is linked to /bin/dash and not to bin bash. So, the fix for this apparent problem with GalSim installation is to use the solution on that page to correctly link /bin/sh to bash.

Scons failed to install TMV on Ubuntu 14.04 (for GalSim)

I tried to install the TMV library (0.7.1) on my Ubuntu 14.04 laptop, before I can install GalSim package. However, it just failed, and gave these information :
scons: Reading SConscript files ...
Unknown variables: ['LINKFLAGS']
I am using Anaconda Python, and the scons version is: v2.3.4
And, on my MacOX 10.8 laptop, the same TMV library can be installed by the same version of scons without any problem
Thank you very much if you can help me about this!
Do you need to manually specify extra LINKFLAGS for some reason? What are the flags set in your tmv_scons.conf file? If LINKFLAGS is in there, you could try removing that and see if that works.

Toolchain binaries cannot be found

Trying to build recent version of u-boot bootloader for my mini2440 ARM board I managed to download a toolchain package from codesourcery and extract it to following path: /usr/local/arm-2008q3/
I also exported following values for current session:
export PATH=$PATH:/usr/local/arm-2008q3/bin
export CROSS_COMPILE=arm-none-linux-gnueabi-
When I run make I get a following output and I cant figure out why:
make: arm-none-linux-gnueabi-gcc: Command not found
for dir in tools examples api_examples ; do make -C $dir _depend ; done
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/deth/uboot/mini2440/tools'
make[1]: arm-none-linux-gnueabi-gcc: Command not found
make[1]: Entering directory `/home/deth/uboot/mini2440/examples'
/bin/sh: 1: arm-none-linux-gnueabi-gcc: not found
I double checked everything and binaries indeed reside in mentioned folder but... Please explain where I'm wrong.
Well, after almost three days of headbanging into the wall I managed to solve this. To be honest I might have never solved it if occasionally hadn't installed the COdesourcery toolchain with executable installer which they also provide. After doing that the manually unpacked version started to execute! This of course led to a conclusion that there were libraries missing. I tried to reproduce the problem on separate virtual machine and voila, here are couple of words that solved the whole issue:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
Hope this will help someone, and thanks to everyone for help!

Installing erlang from tar resulting in errors, wondering how to specify folders

I had the inspiration to start messing around with Erlang and I am having problems installing it... I am using Linux Mint 16 (petra). I installed the dependencies, and then downloaded otp_src_17.1.tar.gz and ran 'tar -zxf otp_src_17.1.tar.gz' I then ran ./configure which gave me some errors that made it impossible to run make.
These are the errors I'm getting (actually what I did was I did ./configure > configure.txt to get all the lines it prints as it configures, and it conveniently still printed to the console everything that has errors - neat)
configure: WARNING: No odbc library found skipping odbc
configure: WARNING: "ODBC library - header check failed"
configure: WARNING: "ODBC library - link check failed"
rm: remove write-protected regular file './CONF_INFO'?
configure: WARNING: No GLU headers found, wx will NOT be usable
/home/core/Desktop/otp_src_17.1/lib/wx/./configure: line 5195: wx-config: command not found
/home/core/Desktop/otp_src_17.1/lib/wx/./configure: line 5893: ./CONF_INFO: Permission denied
configure: WARNING:
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWidgets version is 2.8.4 or above.
rm: remove write-protected regular file 'doc/CONF_INFO'?
/home/core/Desktop/otp_src_17.1/erts/configure: line 6466: doc/CONF_INFO: Permission denied
configure: WARNING: No 'xsltproc' command found: the documentation cannot be built
/home/core/Desktop/otp_src_17.1/erts/configure: line 6513: doc/CONF_INFO: Permission denied
configure: WARNING: No 'fop' command found: going to generate placeholder PDF files
configure: error: No curses library functions found
configure: error: /bin/bash '/home/core/Desktop/otp_src_17.1/erts/configure' failed for erts
The thing is - I know that I have the ncurses library, as evidenced by the fact that when I do "sudo apt-get install ncurses-base ncurses-bin" it says:
Reading package lists... Done
Building dependency tree
Reading state information... Done
ncurses-base is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
When I run "locate ncurses" it gives me the following:
/lib/i386-linux-gnu/libncurses.so.5
/lib/i386-linux-gnu/libncurses.so.5.9
/lib/x86_64-linux-gnu/libncurses.so.5
/lib/x86_64-linux-gnu/libncurses.so.5.9
/lib/x86_64-linux-gnu/libncursesw.so.5
/lib/x86_64-linux-gnu/libncursesw.so.5.9
/usr/bin/ncurses5-config
/usr/bin/ncursesw5-config
/usr/lib/vlc/plugins/gui/libncurses_plugin.so
/usr/share/doc/libncurses5
/usr/share/doc/libncursesw5
/usr/share/doc/ncurses-base
/usr/share/doc/ncurses-bin
/usr/share/doc/ncurses-base/changelog.Debian.gz
/usr/share/doc/ncurses-base/copyright
/usr/share/doc/ncurses-bin/FAQ
/usr/share/doc/ncurses-bin/changelog.Debian.gz
/usr/share/doc/ncurses-bin/copyright
/usr/share/lintian/overrides/ncurses-base
/usr/share/man/man1/ncurses5-config.1.gz
/usr/share/man/man1/ncursesw5-config.1.gz
/var/cache/apt/archives/libncurses5_5.9+20130608-1ubuntu1_i386.deb
/var/lib/dpkg/info/libncurses5:amd64.list
/var/lib/dpkg/info/libncurses5:amd64.md5sums
/var/lib/dpkg/info/libncurses5:amd64.postinst
/var/lib/dpkg/info/libncurses5:amd64.postrm
/var/lib/dpkg/info/libncurses5:amd64.shlibs
/var/lib/dpkg/info/libncurses5:amd64.symbols
/var/lib/dpkg/info/libncurses5:i386.list
/var/lib/dpkg/info/libncurses5:i386.md5sums
/var/lib/dpkg/info/libncurses5:i386.postinst
/var/lib/dpkg/info/libncurses5:i386.postrm
/var/lib/dpkg/info/libncurses5:i386.shlibs
/var/lib/dpkg/info/libncurses5:i386.symbols
/var/lib/dpkg/info/libncursesw5:amd64.list
/var/lib/dpkg/info/libncursesw5:amd64.md5sums
/var/lib/dpkg/info/libncursesw5:amd64.postinst
/var/lib/dpkg/info/libncursesw5:amd64.postrm
/var/lib/dpkg/info/libncursesw5:amd64.shlibs
/var/lib/dpkg/info/libncursesw5:amd64.symbols
/var/lib/dpkg/info/ncurses-base.conffiles
/var/lib/dpkg/info/ncurses-base.list
/var/lib/dpkg/info/ncurses-base.md5sums
/var/lib/dpkg/info/ncurses-bin.list
/var/lib/dpkg/info/ncurses-bin.md5sums
I am at a loss as to where to proceed. Thanks for any help
I believe you need to install ncurses-dev
'sudo yum install ncurses-devel.x86_64' prior to running ./configure worked just fine for me. Fedora 21 x64, btw.
After I extracted the tar, the documentation was in '/opt_src_{version}/HOWTO/INSTALL.md. The contents of which states:
Required Utilities
These are the tools you need in order to unpack and build Erlang/OTP.
WARNING: Please have a look at the [Known platform issues][] chapter
before you start.
Unpacking
GNU unzip, or a modern uncompress.
A TAR program that understands the GNU TAR format for long filenames.
Building
GNU make
Compiler -- GNU C Compiler, gcc or the C compiler frontend for LLVM, clang.
Perl 5
GNU m4 -- If HiPE (native code) support is enabled. HiPE can be
disabled using --disable-hipe
ncurses, termcap, or termlib -- The development headers and
libraries are needed, often known as ncurses-devel. Use
--without-termcap to build without any of these libraries. Note that
in this case only the old shell (without any line editing) can be used.
sed -- Stream Editor for basic text transformation.
ncurses just happened to be the only required package I didn't have installed on this development VM. So your mileage may vary.
This was the output of 'locate ncurses' after I installed the ncurses lib:
/usr/lib64/libncurses++.so.5
/usr/lib64/libncurses++.so.5.9
/usr/lib64/libncurses++w.so.5
/usr/lib64/libncurses++w.so.5.9
/usr/lib64/libncurses.so.5
/usr/lib64/libncurses.so.5.9
/usr/lib64/libncursesw.so.5
/usr/lib64/libncursesw.so.5.9
/usr/share/doc/ncurses
/usr/share/doc/ncurses-base
/usr/share/doc/ncurses/ANNOUNCE
/usr/share/doc/ncurses/AUTHORS
/usr/share/doc/ncurses/NEWS.bz2
/usr/share/doc/ncurses/README
/usr/share/doc/ncurses/TO-DO
/usr/share/doc/ncurses-base/README
/usr/share/licenses/ncurses-base
/usr/share/licenses/ncurses-base/COPYING
So I'd say the OP had a corrupt / bad ncurses install. I'm just posting this here because this was the #1 Google result I got when I was too lazy to RTFD.
One alternative is using the option "--without-termcap"
otp_src_18.0/configure file says:
--without-termcap do not use any termcap libraries
(ncurses,curses,termcap,termlib)
./configure --prefix=/home/username/erlang/18.0 --without-termcap
Set your PATH variable as shown below.
export PATH=$PATH=/home/username/erlang/18.0/bin
Not sure about implications though. :)
Hope this helps someone.

Resources