I'm trying to compile the SndObj library from the source.
Supposedly it's as easy as just running 'scons' from the top of the SndObj directory.
I get this:
nhnifong#ubuntu-nate:~/SndObj-2.6.6$ scons
scons: Reading SConscript files ...
scons: warning: The Options class is deprecated; use the Variables class instead.
File "/home/nhnifong/SndObj-2.6.6/SConstruct", line 58, in <module>
scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.
File "/home/nhnifong/SndObj-2.6.6/SConstruct", line 60, in <module>
SndObj Library version is 2.6.5
Building the Sound Object Library
scons tools in this system: ['default', 'gnulink', 'gcc', 'g++', 'gfortran', 'gas', 'ar', 'filesystem', 'dvipdf', 'gs', 'jar', 'javac', 'javah', 'm4', 'rmic', 'rpcgen', 'swig', 'tar', 'zip']
Checking for Realtime IO support...
OS is Linux...
Checking for C header file alsa/asoundlib.h... (cached) no
Checking for C header file soundcard.h... (cached) no
Checking for C header file jack/jack.h... (cached) no
No alsa or OSS RT support
Host is little endian
swig exists...
Checking for C header file Python.h... (cached) no
Checking for C header file /usr/include/python2.6/Python.h... (cached) yes
Python version is 2.6
Checking for C header file m_pd.h... (cached) no
Checking for C header file ladspa.h... (cached) no
installing python module in /usr/lib/python2.6/dist-packages
scons: done reading SConscript files.
scons: Building targets ...
chmod a-x include/SndObj/*.h
scons: done building targets.
The first problem is that the C header files it claims are missing are all there in /usr/include/
The second problem is that the Python module is not actually installed in /usr/lib/python2.6/dist-packages
It looks like you have one or more config.cache files left over. Those should all be deleted and the installation restarted.
Related
Trying to install the SDL-gfx library on Windows, and running into problems at the configure:
Resolving dependencies...
Configuring SDL-gfx-0.6.0...
checking for sdl-config... /usr/bin/sdl-config
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for SDL_initFramerate in -lSDL_gfx... no
configure: error: *** SDL_gfx lib not found! Get SDL_gfx from
http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/
The link is broken, but I got the tar from http://www.ferzkopp.net/joomla/content/view/19/14/ and looked at the contents. It's a grab bag of header files, c files, etc. I'm not sure where to put these so that SDL-gfx's configure recognizes them. For fun I also grabbed some pre-compiled dll's and header files but I don't know where to put those either.
Anyone know where I should put those files to make them work?
I had similar struggles with SDL, but I eventually found an SDL download with an "include" and "lib" directory, and added them to extra-include-dirs and extra-lib-dirs in my .cabal/config...but I don't know what is "include" and what is "lib" for SDL_gfx.
I'm trying to install terminfo cabal package on my Windows Cygwin installation, but it fails because of curses headers:
$ cabal install terminfo
Resolving dependencies...
Configuring terminfo-0.3.2.5...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
...
checking ncurses.h usability... no
checking ncurses.h presence... no
checking for ncurses.h... no
checking curses.h usability... no
checking curses.h presence... no
checking for curses.h... no
configure: error: in `/tmp/terminfo-0.3.2.5-620/terminfo-0.3.2.5':
configure: error: curses headers could not be found, so this package cannot be built
See `config.log' for more details
Failed to install terminfo-0.3.2.5
cabal.exe: Error: some packages failed to install:
terminfo-0.3.2.5 failed during the configure step. The exception was:
ExitFailure 1
At the same time, NCurses is installed correctly (/usr/include/ncursesw and ncurses).
If before compilation I explicitly add that sub-folder to GCC, it proceeds
export C_INCLUDE_PATH=/usr/include/ncursesw
re-running cabal produced another error:
...
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking for setupterm in -lncursesw... yes
configure: creating ./config.status
config.status: creating terminfo.buildinfo
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
cabal.exe: Missing dependency on a foreign library:
* Missing (or bad) header file: ncurses.h
* Missing C library: ncursesw
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Failed to install terminfo-0.3.2.5
cabal.exe: Error: some packages failed to install:
terminfo-0.3.2.5 failed during the configure step. The exception was:
ExitFailure 1
So I tried cabal install terminfo --extra-lib-dirs=/lib/ncursesw, but then I realized that cabal is a windows app, so I've also tried --extra-lib-dirs=c:/cygwin/lib/ncursesw
In the end, final solution is as follows:
Install Cygwin and ncursesw-devel package there
Run cygwin and configure GCC:
$ export C_INCLUDE_PATH=/usr/include/ncursesw
Since C:\cygwin\usr\include\ncursesw\ncurses.h is a soft-reference in Cygwin, you should manually replace this file with curses.h from the same folder
From the same Cygwin terminal you can now start Cabal (it's a Windows program!):
$ cabal install terminfo --extra-lib-dirs=c:/cygwin/lib --extra-include-dirs=c:/cygwin/usr/include/ncursesw --extra-include-dirs=c:/cygwin/usr/include
So, the library was installed. But when I try to actually use that function, ghc complains:
Loading package terminfo-0.3.2.5 ... linking ... ghc.exe: c:/cygwin/lib\libncursesw.a: unknown symbol `__imp____ctype_ptr__'
Blockquote
Hello, I am trying to compile the latest source of The Powder Toy but my compiler (G++ with scons) is crashing every time it hits a command with --m in it.
Crash log:
scons --lin --release --sse2
scons: Reading SConscript files ...
Checking for C library fftw3f... (cached) yes
Checking for C library bz2... (cached) yes
Checking for C library z... (cached) yes
Checking for C header file bzlib.h... (cached) yes
Checking for C library lua... (cached) no
Checking for C library lua5.1... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
^[[Ag++ -o build/src/Format.o -c -w -std=c++98 -fkeep-inline-functions -sse2 -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -Wunsafe-loop-optimizations -D_GNU_SOURCE=1 -D_REENTRANT -DLUACONSOLE -DGRAVFFT -D_GNU_SOURCE -DUSE_STDINT -D_POSIX_C_SOURCE=200112L -DUSE_SDL -DLIN -DX86 -DX86_SSE2 -I/usr/include/SDL -I/usr/include/lua5.1 -Ibuild/src -Ibuild/data -Ibuild/generated build/src/Format.cpp
g++: error: unrecognized option â-msse2â
scons: *** [build/src/Format.o] Error 1
scons: building terminated because of errors.
Why would this be happening? I've had to delete the -m32 command also to get it to compile.
I strongly suspect that it's because the -sse2 option is telling g++ to generate SSE2, which are SIMD instructions for Intel's x86 architecture. The Raspberry Pi board is a completely different computer architecture (ARM) and does not support SSE2. The ARM equivalent of SSE2 is NEON, but NEON is available for the ARM used in RPi.
I think that for options that g++ doesn't recognize, it tries prefixing with another flag (in this case -m, but I've seen -f before) to see if it's a synonym.
In your case sse2 makes no sense on the Raspberry Pi, and for the above example, is the problem.
What is ^[[A ? Do you have unprintable chars in your makefile? Can you echo all parameters one by one to identify which contains these strange characters?
I have installed this driver for long time, but failed. There is the same mistake as following:
scons: Reading SConscript files ...
Checking for C++ library boost_thread-mt... (cached) no
Checking for C++ library boost_thread... (cached) yes
Checking for C++ library boost_filesystem-mt... (cached) no
Checking for C++ library boost_filesystem... (cached) yes
Checking for C++ library boost_system-mt... (cached) no
Checking for C++ library boost_system... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o build/mongo/client/dbclient_rs.o -c -O3 -pthread -D_SCONS -DMONGO_EXPOSE_MACROS -Ibuild -Isrc -Ibuild/mongo -Isrc/mongo src/mongo/client/dbclient_rs.cpp
In file included from /usr/local/include/boost/filesystem/path.hpp:24,
from src/mongo/util/paths.h:26,
from src/mongo/db/client.h:38,
from src/mongo/db/curop.h:23,
from src/mongo/db/curop-inl.h:1,
from src/mongo/db/instance.h:23,
from src/mongo/db/dbmessage.h:25,
from src/mongo/client/dbclient_rs.cpp:27:
/usr/local/include/boost/filesystem/config.hpp:16:5: error: #error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
scons: *** [build/mongo/client/dbclient_rs.o] Error 1
scons: building terminated because of erro`enter code here`rs.`enter code here`
before install, I have installed the boost 1.5, pcre8.3, and I want install mongodb driver 2.2
Any ideas ? Thanks!
I encountered the same problem with you.
In mongodb C++ driver source src/mongo/pch.h
#define BOOST_FILESYSTEM_VERSION 2
but in /usr/local/include/boost/filesystem/config.hpp:
# if defined(BOOST_FILESYSTEM_VERSION) && BOOST_FILESYSTEM_VERSION != 3
# error Compiling Filesystem version 3 file with BOOST_FILESYSTEM_VERSION defined != 3
# endif
this is the problem.
And I change src/mongo/pch.h to
#define BOOST_FILESYSTEM_VERSION 3
then scons again, the compiles correctly.
Some solution from Internet :
RESOLVED: I have v2 of the 1.44 boost libraries, but had "#define BOOST_FILESYSTEM_VERSION 3" in my header (a co-worker using another version had added it). If I comment this directive, my code compiles correctly. Looks like we need to synchronize our libraries.
Here's the message I get when trying to install in via cabal-install:
$ cabal install --extra-include-dirs="C:\no_spaces\cygwin\usr\include" --extra-lib-dirs="C:\no_spaces\cygwin\lib" readline
Resolving dependencies...
Configuring readline-1.0.1.0...
checking for gcc... gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for GNUreadline.framework... checking for readline... no
checking for tputs in -lncurses... yes
checking for readline in -lreadline... yes
checking for rl_readline_version... yes
checking for rl_begin_undo_group... yes
checking for rl_erase_empty_line... yes
checking for rl_free_undo_list... yes
checking for rl_completion_word_break_hook in -lreadline... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating readline.buildinfo
config.status: creating include/HsReadlineConfig.h
config.status: include/HsReadlineConfig.h is unchanged
cabal.exe: Missing dependencies on foreign libraries:
* Missing header file: HsReadline.h
* Missing C libraries: readline, ncurses
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
cabal.exe: Error: some packages failed to install:
readline-1.0.1.0 failed during the configure step. The exception was:
ExitFailure 1
I have readline.h and whatnot, and clearly it seems to find them. The lack of HsReadline.h being an issue seems strange: isn't that part of the package I'm trying to install?
Any advice on how to get this working would be appreciated. I've spent days mucking around trying to get this to work, whether under gnuWin32 readline, MinGW, or cygwin.
I'm going to venture a guess that what's throwing Cygwin off is the DOS/Windows-style path: "C:\no_spaces\cygwin\usr\include"
Try navigating to these files in the Cygwin shell. It'll probably look something like "/cygdrive/c/no_spaces/cygwin/usr/include"
The message about HsReadline.h is probably a red herring. The real issue is that Cabal can't find the underlying dev library to compile against.