libcurl's header path does not get added to lib compilation paths

Message boards : Server programs : libcurl's header path does not get added to lib compilation paths
Message board moderation

To post messages, you must log in.

AuthorMessage
jeff saremi

Send message
Joined: 26 Aug 15
Posts: 9
United States
Message 63885 - Posted: 28 Aug 2015, 14:14:22 UTC

Error:
/usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../api -I../db -I../lib -I../lib/mac -I../sched -I../tools -I../vda -pthread -Wall -Wextra -Wshadow -Wredundant-decls -Wdisabled-optimization -Wpointer-arith -Wstrict-aliasing -Wcast-align -I/home/jsaremi/code/libmysqlclientdev/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -DPIC -fPIC -DWITH_WSREP -DWSREP_PROC_INFO -DMYSQL_MAX_VARIABLE_VALUE_LEN=2048 -DWITH_INNODB_DISALLOW_WRITES -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -g -O2 -Wall -MT remote_submit.o -MD -MP -MF .deps/remote_submit.Tpo -c -o remote_submit.o `test -f '../lib/remote_submit.cpp' || echo './'`../lib/remote_submit.cpp
../lib/remote_submit.cpp:24:23: error: curl/curl.h: No such file or directory
../lib/remote_submit.cpp: In function 'int do_http_get(const char*, const char*)':


Here's my configure line:
There are two issues here. One is _libcurl_config does not do anything.
Second is that LIBCURL_CPPFLAGS don't get added to the above make file

./configure --disable-client --disable-manager --prefix /home/jsaremi/sys/Linux --enable-server MYSQL_CONFIG=/home/jsaremi/code/libmysqlclientdev/usr/bin/mysql_config --with-ssl=/home/jsaremi/code/openssl/usr --enable-bitness=64 _libcurl_config=/home/jsaremi/code/libcurl/usr/bin/curl-config LIBCURL_CPPFLAGS=/home/jsaremi/code/libcurl/usr/include
ID: 63885 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 669
Finland
Message 63889 - Posted: 28 Aug 2015, 15:52:53 UTC - in response to Message 63885.  

Try changing tools/Makefile.am to something like this:

remote_submit_test_SOURCES = remote_submit_test.cpp ../lib/remote_submit.cpp
remote_submit_test_CPPFLAGS = ${LIBCURL_CPPFLAGS}
remote_submit_test_LDADD = $(SERVERLIBS) ${LIBCURL}


Same disclaimer as previously. I think --with-libcurl should be good enough.



What will be the next bug? Place your bets now. I'm guessing zlib. :P
ID: 63889 · Report as offensive
jeff saremi

Send message
Joined: 26 Aug 15
Posts: 9
United States
Message 63894 - Posted: 28 Aug 2015, 18:28:22 UTC - in response to Message 63889.  

Thanks Juha. I'll give your recommendation a try
ID: 63894 · Report as offensive
jeff saremi

Send message
Joined: 26 Aug 15
Posts: 9
United States
Message 63895 - Posted: 28 Aug 2015, 19:21:46 UTC - in response to Message 63894.  

had to make one slight adjustment to Juha's:

remote_submit_test_CPPFLAGS = -I../lib ${LIBCURL_CPPFLAGS}

and adjust my configure line which wasn't correct. Now it is:

./configure --disable-client --disable-manager --prefix /home/jsaremi/sys/Linux --enable-server MYSQL_CONFIG=/home/jsaremi/code/libmysqlclientdev/usr/bin/mysql_config _libcurl_config=/home/jsaremi/code/libcurl/usr/bin/curl-config LIBCURL_CPPFLAGS="-I/home/jsaremi/code/libcurl/usr/local/include" LIBCURL="-L/home/jsaremi/code/libcurl/usr/local/lib -lcurl"
ID: 63895 · Report as offensive
Juha
Volunteer developer
Volunteer tester
Help desk expert

Send message
Joined: 20 Nov 12
Posts: 669
Finland
Message 63896 - Posted: 28 Aug 2015, 20:05:57 UTC - in response to Message 63895.  

had to make one slight adjustment to Juha's:

remote_submit_test_CPPFLAGS = -I../lib ${LIBCURL_CPPFLAGS}


Weird, -I../lib was already there.

So it works now?
ID: 63896 · Report as offensive

Message boards : Server programs : libcurl's header path does not get added to lib compilation paths

Copyright © 2017 University of California. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.