i have clean centos6 system, try to compile tor from sources.
1st way (installing libevent by yum). I do:
yum install libevent2
yum install libevent2-devel
...
(inside tor folder): ./configure
make
and get error:
src/common/libor-event.a(compat_libevent.o): In function `tor_gettimeofday_cache_clear':
/root/tor-0.3.1.7/src/common/compat_libevent.c:250: undefined reference to `event_base_update_cache_time'
collect2: ld returned 1 exit status
make[1]: *** [src/or/tor] Error 1
make[1]: Leaving directory `/root/tor-0.3.1.7'
make: *** [all] Error 2
2nd way (installing libevent from sources).
yum remove libevent2
yum remove libevent2-devel
..
(from libevent folder): ./configure
make
make install
..
(from tor folder): ./configure
and get error:
checking whether we need extra options to link libevent... configure: error: Found linkable libevent in (system), but it does not seem to run, even with -R. Maybe specify another using --with-libevent-dir}
So, what am i doing wrong?) what to do next?
It is possible that you missed to add the libevent library to library options
LDFLAGS+=-L[path of the libevent.so] -levent
What is the output of the make?
Related
I'm installing CompCert C compiler as instructed here: https://compcert.org/man/manual002.html.
However I'm stuck at the stage where I "Run the configure script with appropriate options: ./configure [option …] target "
The console output is:
~/compcert/CompCert-3.8$ ./configure -use-external-MenhirLib x86_64-linux
Testing assembler support for CFI directives... yes
Testing linker support for '-no-pie' / '-nopie' option... yes, '-no-pie'
Testing Coq... version 8.11.0 -- good!
Testing OCaml... version 4.08.1 -- good!
Testing OCaml native-code compiler...yes
Testing OCaml .opt compilers... yes
Testing Menhir... version 20200123 -- good!
Error: cannot determine the location of the Menhir API library.
This can be due to an incorrect Menhir package.
Consider using the OPAM package for Menhir.
Testing GNU make... version 4.2.1 (command 'make') -- good!
One or several required tools are missing or too old. Aborting.
I'm running Ubuntu 20.04 LTS.
[Edit: I managed to run the ./configure. However I cannot reproduce the exact method how I did it. Now I'm stuck in a different part.]
Follow-up question:
When running make all I receive the following output:
/compcert/CompCert-3.8$ make all
make proof
make[1]: Entering directory '/home/user/compcert/CompCert-3.8'
COQC Axioms.v
Error: Can't find file ./Axioms.v
make[1]: *** [Makefile:226: Axioms.vo] Error 1
make[1]: Leaving directory '/home/user/compcert/CompCert-3.8'
make: *** [Makefile:155: all] Error 2
I fixed that problem by copying lib/Axiom.v to the root. The make all then complained about another library in lib/ so I moved a bunch of them until I received the following error:
~/compcert/CompCert-3.8$ make all
make proof
make[1]: Entering directory '/home/user/compcert/CompCert-3.8'
COQC Ordered.v
File "./Ordered.v", line 90, characters 16-19:
Error: The reference int was not found in the current environment.
make[1]: *** [Makefile:226: Ordered.vo] Error 1
make[1]: Leaving directory '/home/user/compcert/CompCert-3.8'
make: *** [Makefile:155: all] Error 2
And now I'm stuck once again.
It seems that you have an incorrect version of the menhirLib. See these lines in the configure script in the build system which lead to this error. I think the problem is that you installed a different version of menhirLib, possibly using your package manager.
I suggest you to run the following commands to install the latest menhirLib from the opam:
opam update
opam install menhir menhirLib
This should help.
I'm trying to compile a pmars-0.9.2 game, but stumbled on an error while passing the test, after command make -j4:
make[2]: *** [extractor/CMakeFiles/extractor.dir/backoff_sampler.cc.o] Error 1
CMakeFiles/Makefile2:2561: recipe for target 'extractor/CMakeFiles/extractor.dir/all' failed
make[1]: *** [extractor/CMakeFiles/extractor.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
Can you tell me which installation drivers are missing to successfully complete the compilation?
To view logs from an unpacked archived use command:
nano /home/user/Desktop/pmars-0.9.2/cdec/BUILDING
To build cdec, you'll need:
boost headers & boost program_options (you may need to install a package
like libboost-dev)
Instructions for building
1) Create a build directory and generate Makefiles using CMake
mkdir my_build
cd my_build
cmake ..
If the cmake command completes successfully, you can proceed. If you have
libraries (such as Boost) installed in nonstandard locations, you may need
to run cmake with special options like -DBOOST_ROOT=/path/to/boost.
2) Build
make -j 2
3) Test
make test
./tests/run-system-tests.pl
I am trying to create a simple make file and using it to build a simple c program. The environment is in virtual box using the newest version of ubuntu. I have already downloaded the linux headers for ubuntu but still getting the error.
Hello.c
#include <linux/init.h>
#include <linux/module.h>
static int hello_init(void) {
printk(KERN_ALERT "TEST: Hello world, this is soliducode\n");
return 0;
}
static void hello_exit(void) {
printk(KERN_ALERT "TEST: Good byte, from soliduscode");
}
module_init(hello_init);
module_exit(hello_exit);
Makefile
obj-m += Hello.o
KDIR = /usr/src/linux-headers-4.2.0-16-generic
all:
$(MAKE) -C $(KDIR) SUBSIRS=$ modules
clean:
rm -rf *.o *.ko *.mod.* *.symvers *.order
Error
make -C /usr/src/linux-headers-4.2.0-16-generic SUBSIRS=modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-16-generic'
arch/x86/Makefile:138: CONFIG_X86_X32 enabled but no binutils support
Makefile:669: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:462:1: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
}
^
compilation terminated.
scripts/Makefile.host:91: recipe for target 'scripts/basic/fixdep' failed
make[3]: *** [scripts/basic/fixdep] Error 1
Makefile:449: recipe for target 'scripts_basic' failed
make[2]: *** [scripts_basic] Error 2
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h'. Stop.
arch/x86/Makefile:184: recipe for target 'archheaders' failed
make[1]: *** [archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-16-generic'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
It looks like your kernel config is invalid.
There is documentation how to build your own kernel on Ubuntu, e.g.
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
Try using in M=${PWD} option in your Makefile.
Command:
make -C /lib/modules/`uname -r`/build M=${PWD} modules
#Manish Dharanenthiran solved the problem for me.
I was on this problem for about 2 days.
compiled a new kernel, download another one from https://www.kali.org/downloads/, and still got those errors.
To help with that kind of problem I suggest the path below -
first check the kernel you running on with
uname -r
check if you got your current kernel linux-headers inside /usr/src
ls -a /usr/src
if you don't, you need to install them but old version of linux-headers doesn't available by apt-get check if yours available in the list that received by
apt-cache search linux-headers
if your current version is there jump to 3.
if your current version doesn't available you need to: apt-get update & apt-get upgrade / install a newer machine / compile a new kernel
NOTICE - from my experience (I did them all) the update & upgrade is the fastest.
apt-get update
apt-get upgrade
reboot
When booting choose the new kernel in the grub menu
You can edit this file with bigger GRUB_TIMEOUT value if you can't see/catch the menu in boot time
Download the needed linux-headers
apt-get install linux-headers-$(uname -r)
If the problem didn't solve yet, try using in M=${PWD} instead of M=$(PWD) in your Makefile as mentioned by #Manish Dharanenthiran.
I'm trying to build libuv 0.11.24 on a Debian machine. I tried:
./gyp_uv.py -f make
make -C out
I get this error:
make: Entering directory `./out'
LINK(target) ./out/Debug/run-benchmarks
flock: g++: No such file or directory
make: *** [./out/Debug/run-benchmarks] Error 69
make: Leaving directory `./out'
Your Error:
flock: g++: No such file or directory
Indicates that you've not installed a c++ compiler. Because this is a debian system, you need to install the appropriate package(s), which are at a minimum build-essential, which should pull in g++:
sudo apt-get install build-essential
The next question is, why aren't you just installing the system provided version of libuv? The one that you should be able to install using apt-get install libuv-dev ?
'make -C' takes a directory as an argument -- it enters that directory and calls make from there. in this case it's looking for a directory called 'out' which doesn't exist. have you tried just calling make?
I am following up the instruction from http://httpd.apache.org/docs/2.4/platform/rpm.html
to build httpd-2.4.7 RPM for CentOS6.5. But I got the following errors - cannot find the library `/usr/lib64/libexpat.la'.
rpmbuild -tb httpd-2.4.7.tar.bz2
.....
/usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99 -pthread -O2 -g -pie -o htpasswd htpasswd.lo passwd_common.lo /usr/lib64/libaprutil-1.la -ldb-4.3 -lexpat -ldb-4.3 /usr/lib64/libapr-1.la -lpthread -ldl -lcrypt
libtool: link: cannot find the library /usr/lib64/libexpat.la' or unhandled argument/usr/lib64/libexpat.la'
make[2]: * [htpasswd] Error 1
make[2]: Leaving directory /root/rpmbuild/BUILD/httpd-2.4.7/support'<br>
make[1]: *** [all-recursive] Error 1<br>
make[1]: Leaving directory/root/rpmbuild/BUILD/httpd-2.4.7/support'
make: * [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.iSxbcs (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.iSxbcs (%build)
I ran yum search libexpat, the package has been installed.
[root#localhost Downloads]# yum search libexpat
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.les.net
* extras: mirror.its.sfu.ca
* updates: mirror.csclub.uwaterloo.ca
======= Matched: libexpat ==========================
compat-expat1.i686 : A library for parsing XML documents
compat-expat1.x86_64 : A library for parsing XML documents
expat.i686 : An XML parser library
expat.x86_64 : An XML parser library
expat-devel.i686 : Libraries and header files to develop applications using expat
expat-devel.x86_64 : Libraries and header files to develop applications using expat
mingw32-expat.noarch : MinGW Windows port of expat XML parser library
Anyone knows how to solve this issue. Thanks in advance.
Steve
The INSTALL doc states that you can:
./configure --with-included-apr
to use APR and APR-util libraries which include libexpat.la and come with httpd.
A .la file is for libtool to know how to link a library. It's probably in expat-devel, and should be added to the .spec file as a BuildRequires.
Install apr and apr-util before installing apache.
libexpat.la comes along with the source code of apr-util.
Try copying source code directory of apr and apr-util into srclib directory of apache and use ./configure --with-included-apr. This solved my issue.
cp -r /path/of/apr /path/of/apache/srclib/
cp -r /path/of/apr-util /path/of/apache/srclib/
./configure --with-included-apr