I'm trying to install sia-hsd alarm system,
github link
up to that ./configure output is
Setting top to : /home/siahsd-master
Setting out to : /home/siahsd-master/build
Checking for program gcc,cc : gcc
Checking for program ar : /usr/bin/ar
Checking for program pkg-config : /usr/bin/pkg-config
Checking for 'glib-2.0' : yes
Checking for 'talloc' : yes
Checking for 'tevent' : yes
Checking for 'samba-util' : yes
Checking for 'ndr' : yes
Checking for header stdio.h : yes
Checking for header stdlib.h : yes
Checking for header stdint.h : yes
Checking for header stdbool.h : yes
Checking for header sys/time.h : yes
Checking for header sys/types.h : yes
Checking for header sys/stat.h : yes
Checking for header netinet/in.h : yes
Checking for header arpa/inet.h : yes
Checking for header unistd.h : yes
Checking for header string.h : yes
Checking for header fcntl.h : yes
Checking for header errno.h : yes
Checking for header talloc.h : yes
Checking for header glib.h : yes
Checking for header glibconfig.h : yes
Checking for header dbi/dbi.h : yes
Checking for header util/data_blob.h : yes
Checking for header core/ntstatus.h : yes
Checking for header charset.h : yes
Checking for library dbi : yes
Checking for library talloc : yes
Checking for library ndr : yes
Checking for library gmp : yes
Checking for library hogweed : yes
Checking for library nettle : yes
'configure' finished successfully (2.057s)
output of make "CPP=gcc -E -ffreestanding" command is below
[21/27] cstlib: build/jsonbot.c.7.o -> build/libjsonbot.a
[22/27] cstlib: build/siahs.c.6.o -> build/libsiahs.a
[23/27] cstlib: build/sia.c.5.o -> build/libsia.a
[24/27] cstlib: build/config.c.4.o -> build/libconfig.a
[25/27] cprogram: build/chirond.c.10.o build/ndr_chiron.c.10.o -> build/chirond
[26/27] cprogram: build/siahsd.c.8.o -> build/siahsd
[27/27] cprogram: build/secipd.c.9.o build/crc16.c.9.o build/ndr_secip.c.9.o -> build/secipd
Waf: Leaving directory `/home/siahsd-master/build'
'build' finished successfully (3.389s)
When I'm using the make install command, I got this error :
make: *** No rule to make target `install'. Stop.
Any idea about how to solve it ?
Thanks a lot
As stated, the Makefile doesn't contain a "install" target, thus make does not know how to make it. Taking a look at the waf build file, that doesn't provide any clue on how the install target should be implemented. Apparently installation is not required after building the software, just run it.
You could implement the "dist" target in the Makefile to see what it actually packages. Maybe that provides a hint on what should be installed.
dist:
#bin/waf dist
Related
Cross compiler:
Sourcery_G++_Lite/bin/arm-none-linux-gnueabi
Autoconfig failed on below checking of "grab the raw symbol name" with arm-none-linux-gnueabi-nm.
checking command to parse /opt/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-nm -B output from arm-none-linux-gnueabi-gcc object... **failed**
Eventually, this caused all checking for symbols failed.
checking for struct dirent.d_type... yes
checking The type of len parameter of gperf hash/lookup function... size_t
checking for FREETYPE... yes
checking for FT_Get_BDF_Property... no
checking for FT_Get_PS_Font_Info... no
checking for FT_Has_PS_Glyph_Names... no
checking for FT_Get_X11_Font_Format... no
checking for FT_Done_MM_Var... no
checking for EXPAT... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_SetDoctypeDeclHandler... no
configure: error:
*** expat is required. or try to use --enable-libxml2
FAILED
libexpat has been cross-compiled and is avaialbe under root/usr/lib, autoconfig cannot detect it properly.
I believe the cross compiler toolchain works well, as it builds all other modules like Freetype, jpeg or png library. fontconfig is the only module that failed so far.
Any clue what can be the possible cause?
I'm new to emscripten; several days ago I've downloaded it just to try to make a port of a game to JS.
Anyway, after some steps, I'm having this issue now (on Ubuntu 16.04 STL).
By following build steps here, first of all, I've set environment variables with
source ./emsdk_env.sh and then I've tried to configure the project with emconfigure ./configure in the project directory. When checking for tools emscripten needs, I've got this error:
checking for SDL... no
configure: error: Package requirements (sdl2 >= 2.0.1) were not met:
No package 'sdl2' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables SDL_CFLAGS
and SDL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR:root:Configure step failed with non-zero return code 1! Command line: ['./configure'] at ...
So I've tried to set that variable with the following command:
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/
This is where actually sdl2.pc is located on my machine, but it didn't help.
So then I've set the following variables that emconfigure needed:
export SDL_PATH=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
export SDL_LIBS=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
export SDL_CFLAGS=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
export SDLNET_LIBS=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
export SDLNET_CFLAGS=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
export SDLMIXER_LIBS=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
export SDLMIXER_CFLAGS=/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h
and relaunched emconfigure ./configure which has completed well.
So the next step is emmake make that gives me the following error:
make all-recursive
make[1]: Entering directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0'
Making all in textscreen
make[2]: Entering directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0/textscreen'
Making all in fonts
make[3]: Entering directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0/textscreen/fonts'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0/textscreen/fonts'
Making all in .
make[3]: Entering directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0/textscreen'
CC txt_conditional.o
Traceback (most recent call last):
File "/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/emcc", line 11, in <module>
python_selector.run(__file__)
File "/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/tools/python_selector.py", line 38, in run
sys.exit(run_by_import(filename, main) if on_allowed_version() else run_by_subprocess(filename))
File "/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/tools/python_selector.py", line 13, in run_by_import
return getattr(importlib.import_module(os.path.basename(filename)), main)()
File "/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/emcc.py", line 1345, in run
assert header.endswith(HEADER_ENDINGS), 'if you have one header input, we assume you want to precompile headers, and cannot have source files or other inputs as well: ' + str(headers) + ' : ' + header
AssertionError: if you have one header input, we assume you want to precompile headers, and cannot have source files or other inputs as well: ['/home/ustym/Documents/Projects/emsdk/emscripten/1.37.38/system/include/SDL/SDL.h', 'txt_conditional.c'] : txt_conditional.c
Makefile:447: recipe for target 'txt_conditional.o' failed
make[3]: *** [txt_conditional.o] Error 1
make[3]: Leaving directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0/textscreen'
Makefile:467: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0/textscreen'
Makefile:585: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/ustym/Documents/Projects/chocolate-doom-3.0.0'
Makefile:438: recipe for target 'all' failed
make: *** [all] Error 2
that means, I assume, that SDL_PATH, SDL_LIBS, SDL_CFLAGS... variables weren't set correctly. Or maybe I just need to precompile that headers in the SDL directory.
One last thing: if I skip setting SDL variables and the configuration step and just launch emmake make, the compilation goes well, but then, emcc command gives me
WARNING:root: .o is not valid LLVM bitcode
for all generated .o files. And that actually makes sense.
So I'm pretty stuck here. Somebody can tell me how to set correctly PKG_CONFIG_PATH for emscripten or if i really need to precompile those headers in the SDL directory? Thanks!
First of all, setting PKG_CONFIG_PATH, include or, even worse, library directories (-I and -L) to host libraries' ones looks like awful idea to me: Emscripten object files contain LLVM bitcode (and not host machine code), its .so files AFAIK contain bitcode as well. It is that bitcode that gets translated to JS, not host machine code. So you need to build your program's dependencies with Emscripten by yourself (and should most probably not install them to the host system). Fortunately, there are some official Emscripten ports (see here) for details.
Emscripten has its own implementation of SDL v1 (that you probably tried to use manually), but your program seems to require SDL2. Good news: you probably just need to pass -s USE_SDL=2 to CFLAGS and LDFLAGS when configureing (see later on the link above for information on SDL2 port). Bad news: something may not be fully ported. But I successfully used it to some extent.
When you have configured on host and make with emmake you probably had compiler paths among other parameters adjusted by emconfigure and emmake already baked into generated Makefile by ./configure not controlled by emconfigure, so host gcc/clang just generated machine code.
I would like to be able to use talloc in an embedded project I am working on, but have been unable to determine how I go about incorporating it into my development environment. The environment in question is a vendor-supplied Windows IDE that uses ARM GCC 4.4.1, and I am using it to target an ARM7 device.
I have gotten to the stage where the compiler is complaining about conflicting types:
In file included from .\talloc-2.0.8\talloc.c:33:
.\talloc-2.0.8\lib\replace/replace.h:626: error: conflicting types for 'ptrdiff_t'
c:\program files (x86)\cypress\psoc creator\2.2\psoc creator\import\gnu_cs\arm\4.4.1\bin\../lib/gcc/arm-none-eabi/4.4.1/include/stddef.h:149: note: previous declaration of 'ptrdiff_t' was here
.\talloc-2.0.8\lib\replace/replace.h:848: error: conflicting types for 'useconds_t'
c:\program files (x86)\cypress\psoc creator\2.2\psoc creator\import\gnu_cs\arm\4.4.1\bin\../lib/gcc/arm-none-eabi/4.4.1/../../../../arm-none-eabi/include/sys/types.h:253: note: previous declaration of 'useconds_t' was here
.\talloc-2.0.8\talloc.c:123: error: expected specifier-qualifier-list before 'uint8_t'
I noticed that replace.h tries to include a file called config.h that does not exist in the talloc source tree - a problem I got around by creating a blank file by that name. Is the idea to use config.h to inform talloc what functions are already defined by the system? Is this just a matter of using the #define directive to prevent replace.h from trying to replace existing types?
Given that this is the first time I have attempted to use code that I did not write myself in a project, I am somewhat confused as to how to go about reconciling these conflicts.
config.h should be generated automatically. For tmalloc, it's done by waf (python-based build system).
$ python ./buildtools/bin/waf configure
Checking for program gcc or cc : /usr/lib/ccache/gcc
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for gcc : ok
Checking for program git : /usr/bin/git
Check for -MD : yes
....
$ python ./buildtools/bin/waf build
.....
I am having a bear of a time getting autoconf to check for the presence of a particular header file.
Let's call the header dependency "inky.h", and let's say that inky is a library that was installed (seperately) with the prefix set to "/usr/local". This put "inky.h" in /usr/local/inky/inky.h and libinky.so in /usr/local/lib.
Now, I'm trying to verify the presence of inky.h in my applications configure.ac as follows:
dnl # Setup temp LDFLAGS and look for inky library/header
LDFLAGS_SAVE=${LDFLAGS};
CPPFLAGS_SAVE=${CPPFLAGS};
dnl # Look for inky on the user specified inky install path
LDFLAGS ="-L${inky_library_path}";
CPPFLAGS="-I${inky_include_path}/inky";
AC_MSG_NOTICE([Looking for inky.h using: ${CPPFLAGS}]);
dnl # This check finds inky.h just fine. This check was only used for debugging
AC_CHECK_FILE(
[${inky_include_path}/inky/inky.h],
[AC_MSG_NOTICE([Found inky.h])],
[AC_MSG_NOTICE([Didn't find inky.h])]
)
dnl # Look for the inky header file. If it isn't found, terminate.
AC_CHECK_HEADER(inky.h,
[],
[AC_MSG_ERROR([Couldn't find or include inky.h])]
)
This produces the following output from ./configure (after an autoreconf -vfi):
configure: Looking for inky.y in fetk include path: -I/usr/local/include/inky.y
checking for /usr/local/include/inky/inky.h... yes
configure: Found inky.h
checking inky.h usability... no
checking inky.h presence... yes
configure: WARNING: inky.h: present but cannot be compiled
configure: WARNING: inky.h: check for missing prerequisite headers?
configure: WARNING: inky.h: see the Autoconf documentation
configure: WARNING: inky.h: section "Present But Cannot Be Compiled"
configure: WARNING: inky.h: proceeding with the compiler's result
checking for inky.h... no
configure: error: Couldn't find or include inky.h
Now, this appears to be the case because inky.h includes 2 other headers, so I add them in on the fourth parameter of AC_CHECK_HEADER like so:
dnl # Look for the inky header file. If it isn't found, terminate.
AC_CHECK_HEADER(inky.h,
[],
[AC_MSG_ERROR([Couldn't find or include inky.h])],
[dinky.h plinky.h]
)
Which renders this output from ./configure:
configure: Looking for inky in fetk include path: -I/usr/local/include/inky
checking for /usr/local/include/inky/inky.h... yes
configure: Found inky.h
checking for inky.h... no
configure: error: Couldn't find or include inky.h
I'm at my wits end with autoconf. Does anyone have any idea where I'm going wrong here. Is it possible to get configure to provide more details about what is failing? Why can I find the file itself, but the AC_CHECK_HEADER macro fails?
Also, please don' tell me to use a different package distribution suite. I would never have chosen Autoconf myself, but I do have to add some dependencies to a pre-existing project.
Also note that the actual library is not named "inky." However, there is an issue of "official use only" for this project, so I have changed the names to protect the...well, to protect myself!
[Edit - Closing]
Figured out the problem. See my answer.
I found what the issue was. The library that I am working with is a C library, but the "inky" library that I am linking against is a C++ library. So, the language (AC_LANG) was set to C early in the configure.ac script. While performing checks for "inky", I needed to change the language to C++ so that Autoconf used the C++ compiler instead of the C compiler. This was done rather easily by using:
AC_LANG_PUSH([C++])
dnl # Do the checks for inky
AC_LANG_POP([C++])
This solved both the problem that I asked about in this thread, and on that I hand't posted yet wherein I couldn't get the AC_CHECK_LIB macro to work.
Thank you everyone for your input.
The fourth argument of AC_CHECK_HEADER is not a list of headers, but some C code that performs the include.
Maybe try something along the line of
AC_CHECK_HEADER([inky.h],
[],
[AC_MSG_ERROR([Couldn't find or include inky.h])],
[#include <dinky.h>
#include <plinky.h>
])
or even
AC_CHECK_HEADERS([dinky.h plinky.h inky.h],
[],
[AC_MSG_ERROR([Couldn't find or include this header])],
[#if HAVE_DINKY_H
# include <dinky.h>
#endif
#if HAVE_PLINKY_H
# include <plinky.h>
#endif
])
The details about why this test is failing are in config.log. My guess is though, that:
Since you're not adding the path found with AC_CHECK_FILE to CPPFLAGS or INCLUDES or whatever autoconf is using these days.
AC_CHECK_HEADER does not find the header using preprocessor compilation (for another reason than the header being missing in CPPFLAGS includes).
I'm attempting to compile SndObj, and I need some header files. Which Debian packages do I need to obtain all the missing header files?
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
Checking for C header file m_pd.h... (cached) no
Checking for C header file ladspa.h... (cached) no
Try the Debian package contents search page
(give a man a fish, etc.)
I used
apt-file search asoundlib
Seems at least that file is in libasound-dev .