Page 1 of 1

Enabling cURL?

PostPosted: Thu Feb 28, 2013 08:43
by 0gb.us
When I run the line "cmake . -DRUN_IN_PLACE=1" from the Minetest directory, it tells me it can't find cURL, although I just installed it. How do I fix that?

-- CURL_INCLUDE_DIR = CURL_INCLUDE_DIR-NOTFOUND
-- CURL_LIBRARY = CURL_LIBRARY-NOTFOUND


Thanks!

PostPosted: Thu Feb 28, 2013 09:47
by Traxie21
I assume you're on Linux?
Try setting those values to the directory and .so (or whatever it uses) that cURL is installed to. (Possibly /usr/share/curl, or /usr/bin/curl)

PostPosted: Thu Feb 28, 2013 09:52
by 0gb.us
Traxie21 wrote:I assume you're on Linux?
Try setting those values to the directory and .so (or whatever it uses) that cURL is installed to. (Possibly /usr/share/curl, or /usr/bin/curl)


Okay, thanks! I located curl at /usr/bin/curl. I'm not sure how to find the .so though. Also, how do I set those values?

PostPosted: Thu Feb 28, 2013 09:59
by Traxie21
Wow, you're up late (If you live in the USA/Canada by any chance).
(I have a bad cold, can't sleep)

Anyhow, Its been awhile since I tried to compile for linux, try looking through all the files you can find in your compile directory that have Cmake in the name..... Thats how I found it on Windows (I hate windows, but my HDD is too small to install any full featured distro, and I need In for my work)
The .so may be in usr/lib/ or another directory that is right on the tip of my tongue........

What was in /usr/bin/curl? If it was an executable, you might be able to *try* using that for the CURL_LIBRARY.

PostPosted: Thu Feb 28, 2013 10:15
by 0gb.us
0gb.us wrote:Also, how do I set those values?

Never mind. Some experementing found that using the -DCURL_LIBRARY and -DCURL_INCLUDE_DIR flags works. Although why a "D" is part of the flag is still a mystery to me.

Traxie21 wrote:Wow, you're up late (If you live in the USA/Canada by any chance).
(I have a bad cold, can't sleep)

Anyhow, Its been awhile since I tried to compile for linux, try looking through all the files you can find in your compile directory that have Cmake in the name..... Thats how I found it on Windows (I hate windows, but my HDD is too small to install any full featured distro, and I need In for my work)
The .so may be in usr/lib/ or another directory that is right on the tip of my tongue........

What was in /usr/bin/curl? If it was an executable, you might be able to *try* using that for the CURL_LIBRARY.


I'm near the west cost, in Oregon. I have a cold as well and can't sleep, but those are unrelated issues in my case.

My condolences on your having to use Windows.

Yeah, /usr/bin/curl is an executable.

I couldn't find anything that looked cURL related in /usr/lib, but I'll look through those Cmake files tomorrow. For now, I set CURL_INCLUDE_DIR to an empty string. I'm going to see how badly that screws things up, then head to bed.

EDIT: The empty string didn't prevent compilation, but it also didn't enable cURL. I'll work on this more tomorrow.

PostPosted: Thu Feb 28, 2013 12:13
by Calinou
There are a billion of cURL versions, personally the one I installed is:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install libcurl4-openssl-dev


Try using this one instead, then regenerate the cmake files, use a "make clean" in the src directory and recompile.

PostPosted: Thu Feb 28, 2013 16:11
by 0gb.us
Calinou wrote:There are a billion of cURL versions

Yeah ... I noticed that late last night. It in my software history, it seems I already had several versions before installing the one I did last night.

Calinou wrote:There are a billion of cURL versions, personally the one I installed is:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
sudo apt-get install libcurl4-openssl-dev


Try using this one instead, then regenerate the cmake files, use a "make clean" in the src directory and recompile.


Alright, that worked. Awesome. Thank you both!

When I tried running the server after that, I got an error with a large backtrace. If anybody wants that, I saved it, but attempting to start the server a second time (with the exact same script) worked the second time.