Error in automake - configure

I’ve trying to create install package for hello world sample C program.
I’ve done following staps.
autoscan
mv configure.scan configure.ac
edit configure.ac to add some macros.
aclocal
create Makefile.am within
bin_PROGRAMS = hello
hello_SOURCES = hello.c
Finally I did automake .
Then I got messages bellow. .
configure.ac:12: error: required file './compile' not found
configure.ac:12: 'automake --add-missing' can install 'compile'
configure.ac:6: error: required file './missing' not found
configure.ac:6: 'automake --add-missing' can install 'missing'
Makefile.am: error: required file './INSTALL' not found
Makefile.am: 'automake --add-missing' can install 'INSTALL'
Makefile.am: error: required file './NEWS' not found
Makefile.am: error: required file './README' not found
Makefile.am: error: required file './AUTHORS' not found
Makefile.am: error: required file './ChangeLog' not found
Makefile.am: error: required file './COPYING' not found
Makefile.am: 'automake --add-missing' can install 'COPYING'
Makefile.am: error: required file './depcomp' not found
Makefile.am: 'automake --add-missing' can install 'depcomp'
There aren’t any strings including compile, missing ,NEW, README or the massage said being required in Makefile.am an configure.ac files.
What should I do?
Those are information about version of some products.
CentOS release 6.4
autocomf-2.69
automake-1.14
m4-1.4

Those files need to exist to conform to the standard 'automake/autoconf' set of files.
Follow the instructions it gives you: "automake --add-missing", and the missing files will be created with dummy information which you would (in a perfect world) fill in appropriately.
Try perusing the autotools tutorial, or perhaps the autobook. See also StackOverflow: Getting started with autotools.
Additionally, read the man pages, try automake --help, read what the utility helpfully output to assist you?

Probably adding foreign to AM_INIT_AUTOMAKE macro in configure.ac could be helpful in this case.

Related

Ignore `libseccomp package not found` error in go.mod file

I've been experimenting with libseccomp-golang and I've encountered the following problem in the go.mod file:
pkg-config: exec: "pkg-config": executable file not found in $PATH
This is an expected error because pkg-config is not installed. However, when I install it via brew I receive the following error:
# pkg-config --cflags -- libseccomp
Package libseccomp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libseccomp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libseccomp' found
pkg-config: exit status 1
I know that libseccomp is a linux-specific package and I do not have a linux distribution installed. However, I would really like to ignore the error in the go.mod file, because everything works as expected when I build the project in a docker container. Is there any way to ignore this error?

Which Protoc Does "Make" Command Use?

I am trying to build LAB which generate robust facial landmark.
In installation guide it says one needs to install Caffe prerequisites which I'd checked CUDA and BLAS well installed on my AWS EC2 instance.
Then I git cloned and typed make under the cloned git folder named in LAB
But it returns following error
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:0:
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
^
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^
.build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers.
#error your headers.
^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:0:
.build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: No such file or directory
compilation terminated.
Makefile:588: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1
The error above looks like I am using old version of libprotoc so if I type in which protoc it returns
/home/ubuntu/anaconda3/bin//protoc
and for protoc --version it returns libprotoc 3.5.1
and for whereis protoc it returns
protoc: /usr/local/bin/protoc /home/ubuntu/anaconda3/bin/protoc /usr/share/man/man1/protoc.1.gz
Thus since it looks like I have another protoc in /usr/local/bin I had checked its version via /usr/local/bin/protoc --version which returns
libprotoc 3.3.0
Hereby I have two problems:
1) I don't know if I use make cmd, which protoc being referred.
2) I don't know the error requires which version of protoc.
How can I check and get the proper information regarding above two problems?
Try something like PROTOC=/home/ubuntu/anaconda3/bin/protoc make
Make sure compiler got correct path to protobuf headers with appropriate -I option.

fatal error: Eigen/Core: No such file or directory compilation terminated

I recently change my OS to the last mint cinamon. Compiling one of the library I need (and that I used to used without problem), I get this message:
fatal error: Eigen/Core: No such file or directory compilation terminated.
I don't know what to do.
Thanks for the help.
Including directory /usr/local/include/eigen3/ solved this for me.
Like this, for example:
g++ -I/usr/local/include/eigen3/ CODE.cpp -o EXECUTABLE
Try to install eigen3 library,
on Ubuntu it would be
sudo apt-get install libeigen3-dev

How to link jemalloc shared library using cmake

I'm trying to link the jemalloc library into my application at build time using it as a generic implementation. According to https://github.com/jemalloc/jemalloc/wiki/Getting-Started the linking flags to use are:
-L`jemalloc-config --libdir` -Wl,-rpath,`jemalloc-config --libdir` -ljemalloc `jemalloc-config --libs`
So I did the following CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.12.2)
project(widget)
include_directories(include)
file(GLOB SOURCES "src/*.cpp")
add_executable(widget ${SOURCES})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L`jemalloc-config --libdir` -Wl,-rpath,`jemalloc-config --libdir` -ljemalloc `jemalloc-config --libs`")
But when I do make I get the following errors:
Linking CXX executable widget
c++: error: `jemalloc-config: No such file or directory
c++: error: unrecognized command line option ‘--libdir`’
c++: error: unrecognized command line option ‘--libdir`’
c++: error: unrecognized command line option ‘--libs`’
make[2]: *** [widget] Error 1
make[1]: *** [CMakeFiles/widget.dir/all] Error 2
For future generations, as this still comes up as one of the first links on Google.
Jemalloc comes with pkg-config setup, which can be used like this:
find_package(PkgConfig REQUIRED)
pkg_check_modules (JEMALLOC jemalloc)
pkg_search_module(JEMALLOC REQUIRED jemalloc)
include_directories(${JEMALLOC_INCLUDE_DIRS})
target_link_libraries(your_target_name ${JEMALLOC_LIBRARIES})
execute_process() command is your friend. Use it to run jemalloc-config executable and then put its output into CMake variables.
find you root_dir of jemalloc. Mine is /Users/lion/homebrew/Cellar/jemalloc/5.2.1_1/lib/
(I install jemalloc by brew on macOS)
link (soft link) all its lib to your local lib ln -s /Users/lion/homebrew/Cellar/jemalloc/5.2.1_1/lib/* /usr/local/lib
Then it works!

cross-compiling with gcc, got storage size of ... isn't known error when it is defined in an include file under sysroot

I have a question very simliar to Cross compiler default include path setup but there wasn't the answer I was looking for.
I built a cross-compiler for openrisc. I have it in ~/openrisck/toolchain/
under there, I have bin(or32-linux-* excutables are here), include, lib, lib64, libexec, or32-linux, share.
under or32-linux, I have bin, include, lib, sys-root.
When I build busybox, I gave CONFIG_CROSS_COMPILER_PREFIX as "or32-linux-".
and CONFIG_SYSROOT as "$SYSROOT" which is ~/openrisk/toolchain/or32-linux/sys-root.
then I run 'make install' in buxybox source. Since the path includes the cross-compiler directory, it compiles for or32-linux-. But I have an error below
ckim : srctree = /home/ckim/openrisc/busybox
CC applets/applets.o
In file included from /home/ckim/openrisc/toolchain/bin/../lib/gcc/or32-linux/4.5.1-or32-1.0rc1/include-fixed/syslimits.h:7:0,
from /home/ckim/openrisc/toolchain/bin/../lib/gcc/or32-linux/4.5.1-or32-1.0rc1/include-fixed/limits.h:34,
from include/platform.h:141,
from include/libbb.h:13,
from include/busybox.h:8,
from applets/applets.c:9:
/home/ckim/openrisc/toolchain/bin/../lib/gcc/or32-linux/4.5.1-or32-1.0rc1/include-fixed/limits.h:169:61: fatal error: limits.h: No such file or directory
compilation terminated.
make[1]: *** [applets/applets.o] Error 1
make: *** [applets_dir] Error 2
which makes me thinks that Ah! the cross-compiler uses the include path relative to the executable. (see above bin/../lib/gcc/or32-linux/version/include-fixed)
So the include limits.h goes to the gcc's limits.h correctly. The last file syslimits.h has #include_next when the limits.h file have already been included. and the compiler complains that the file cannot be found.
Can somebody tell me how to solve this problem? (limits.h includes syslimits.h and syslimits.h includes limits.h .. )
EDIT : I ran 'make CROSS_COMPILE=or32-linux- CONFIG_PREFIX=$SYSROOT install'
then I got 'lutimes undeclared in coreutil/touch.c' error. Assuming the limit.h problem is gone, this means I should give these command line arguments because CROSS_COMPILE for make is different from CONFIG_CROSS_COMPILER_PREFIX in busybox configuration and make's CONFIG_PREFIX is different from CONFIG_SYSROOT for busybox configuration. so to remove the lutimes error, I ran 'make menuconfig' and removed CONFIG_TOUCH. Then I reran the make(make CROSS_COMPILE=or32-linux- CONFIG_PREFIX=$SYSROOT install), and this time got
procps/free.c: In function 'free_main':
procps/free.c:51:17: error: storage size of 'info' isn't known
procps/free.c:77:2: warning: implicit declaration of function 'sysinfo'
I found that in $SYSROOT/usr/include/sys/sysinfo.h, struct sysinfo is defined. I don't know why it says it's not defined. Any help would be deeply appreciated. Thanks!
For anyone who might be facing the same problem I had..
I tried about 3 times with the old toolchain but failed.
Yesterday, I got help from IRC (openrisc) and someone told me there is an updated toolchain for or1k. (not or32 which is old. I should have read the opencore page first..)
The page is
http://opencores.org/or1k/OpenRISC_GNU_tool_chain#Linux_.28uClibc.29_toolchain_.28or1k-linux-uclibc.29 (read from Linux (uClibc) toolchain (or1k-linux-uclibc))

Resources