-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make install error #3
Comments
Hi Looks like it cannot find the jansson.h file, which is part lib-jansson. When you configured the source code, you would have provided an option like Can you check the path you provided for jansson? Under that path, there should be a file called |
@darrenjs thank you root@debian:~/wampcc# lsb_release -a root@debian:~/wampcc# ./fetch_prerequisites.sh --2017-05-29 05:59:48-- https://github.com/google/googletest/archive/release-1.8.0.tar.gz release-1.8.0.tar.gz 100%[==============================================================================================>] 1.22M 285KB/s in 4.8s 2017-05-29 05:59:55 (263 KB/s) - ‘release-1.8.0.tar.gz’ saved [1281617/1281617] *** fetching jalson 1.0 *** --2017-05-29 05:59:55-- https://github.com/darrenjs/jalson/archive/v1.0.tar.gz jalson-1.0.tar.gz [ <=> ] 33.09K 164KB/s in 0.2s 2017-05-29 05:59:58 (164 KB/s) - ‘jalson-1.0.tar.gz’ saved [33886] root@debian:~/wampcc# ./autotools_setup.sh root@debian:~/wampcc# make install ====================================== ==================== |
Hi Thanks for this. So looks like it cannot find |
I build jansson. root@debian:/opt/jansson-2.7# ls lib root@debian:/opt# ls |
Ok. This is generally not the recommended way to build jansson. What you can try is rebuilding jansson again (starting from a clean directory and fresh unzip) but using the
It's also good practise to avoid building from inside the source directory. Buy try this change to configure, followed by |
ok, thank you. libuv must be build. otherwise has error. wampcc/io_loop.h:20:16: fatal error: uv.h: No such file or directory is this info that the build was successful? |
Looks like it is still failing, but this time on trying to find the libuv header files. When you configure libuv, you should use the To test that the wampcc works, try compiling the examples. cd examples This will likely give errors saying you need to define some environment variables, so define them as required (refer to the paths you have earlier used for libuv, jansson etc). Also see if the |
I don't know what reason. libtool: link: g++ -g -O2 -o .libs/test_wamp_rpc test_wamp_rpc.o -L../lib /root/wampcc/lib/.libs/libwampcc.so -L../jalson/src /root/wampcc/jalson/src/.libs/libwampcc_json.so -L/opt/libuv-1.10.2/lib -luv -lcrypto -lpthread ./.libs/libgtest.a -pthread -Wl,-rpath -Wl,/var/tmp/wampcc_install/lib |
If in bash, do something like: export WAMPCC_HOME=/var/tmp/wampcc_install
export LD_LIBRARY_PATH=${WAMPCC_HOME}/lib:$LD_LIBRARY_PATH The LD_LIBRARY_PATH change will be needed to actually run the examples. |
Hi, updated the autotools configure.ac etc, so that some of the example programs will get automatically built. So just need to do the normal configure & make, and some of the examples will be built and then ready to be run. Change is in latest master. |
root@debian:/opt# ls -al build jansson. export LIBUV_HOME=/opt/libuv-1.10.2 ./configure --prefix=/var/tmp/wampcc_install --with-libuv=/opt/libuv-1.10.2 --with-jansson=/opt/jansson-2.7 make install |
Hi, thanks for this. I think its worth writing up a step by step guide. From the above, I can see that those steps have the So, lets say that the intention is to install wampcc under # create wampcc base directories
mkdir /opt/wampcc
mkdir /opt/wampcc/build
# clone wampcc into 'src' directory
cd /opt/wampcc
git clone https://github.com/darrenjs/wampcc.git src
# fetch prerequisities into source directory
cd /opt/wampcc/src
./fetch_prerequisites.sh
./autotools_setup.sh
# configure the make files, from inside the 'build' directory, and set the
# install prefix to be '/opt/wampcc'
cd /opt/wampcc/build
../src/configure --prefix=/opt/wampcc --with-libuv=/opt/libuv-1.10.2 --with-jansson=/opt/jansson-2.7
# compile
make -j
# test that 'basic_embedded_router' was automatically built (only a couple of
# the examples get built automatically)
./examples/basic_embedded_router 55533
# finally, install the wampcc header & libs (into /opt/wampcc)
make install
# check the `admin` command was installed, this will be successful if the
# example router is still running
/opt/wampcc/bin/admin 127.0.0.1 55533 -c greeting
# optionally, can now delete the `build` directory
rm -rf /opt/wampcc/build
# Now try to build all the examples, using the installed header & library
# files. This how custom application would build against wampcc.
export LIBUV_HOME=/opt/libuv-1.10.2
export JANSSON_HOME=/opt/jansson-2.7
export WAMPCC_HOME=/opt/wampcc
cd /opt/wampcc/src/examples
make
# Before attempting to start any of the example programs, set the `LD_LIBRARY_PATH` so that
# it picks up the libuv, jansson & wampcc libraries
export LD_LIBRARY_PATH=${WAMPCC_HOME}/lib:${JANSSON_HOME}/lib:${LIBUV_HOME}/lib |
Hi! Seems to be related to the topic. |
Another issue it is 'makefile' placed in examples - it has higher priority for 'make' program and requires some extra stuff to build normally (which is annoying). With regular automake's Makefile the directory build is fine. I would suggest to rename this 'makefile' for custom uses. Thanks! |
Hi. For the makefile in 'exampes', how do you mean it takes higher priority? During an autotools build, this makefile is skipped over. The intention of this file is to be an example makefile for building the examples, after wampcc has been installed. |
Hi @darrenjs !
When 'make' program is invoked it looks for its default makefile in order: makefile, Makefie (https://www.gnu.org/software/make/manual/html_node/Makefile-Names.html)
Not really, 'makefile' is used first instead of automake's 'Makefile':
That is understood. The problem is that for normal installation 'Makefile' should be used there. The simple solution would be to rename 'makefile' to something like 'makefile.examples' and after build and installation to create symbolic link:
, and work as you desire. Another option would be to remove examples/ from SUBDIRS of top level Makefile.am, IOW to exclude it from the build process. But in this case your users will need to bother with 'makefile''s definitions manually. |
Hi, okay, I see this happens when configure has been executed inside the source tree. I renamed the makefile. And incorparated your patch also. Many thanks for the feedback. |
Thank you for the great project and quick response. ) |
root@ubuntu:/opt$ ls -al |
So it cannot find Note that it's not generally recommended to do build/test/install as root etc. |
In file included from vendors.cc:8:0:
vendor_jansson.cc:8:21: fatal error: jansson.h: No such file or directory
#include "jansson.h"
^
compilation terminated.
Makefile:473: recipe for target 'vendors.lo' failed
make[2]: *** [vendors.lo] Error 1
make[2]: Leaving directory '/root/wampcc/jalson/src'
Makefile:404: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/root/wampcc/jalson'
Makefile:405: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
The text was updated successfully, but these errors were encountered: