Skip to content
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

auth branch does not compile on Linux #111

Closed
emilis opened this issue Jan 8, 2014 · 9 comments
Closed

auth branch does not compile on Linux #111

emilis opened this issue Jan 8, 2014 · 9 comments

Comments

@emilis
Copy link
Contributor

emilis commented Jan 8, 2014

  • I am using Ubuntu 13.04.
  • Using auth branch with last commit being 27eae8d (more auth)
  • I have tried installing build dependencies for curl – didn't help.
$ make
-- Using X11 for window creation
-- Using GLX for context creation
CMake Error at CMakeLists.txt:26 (find_package):
  By not providing "Findcurl.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "curl", but
  CMake did not find one.

  Could not find a package configuration file provided by "curl" with any of
  the following names:

    curlConfig.cmake
    curl-config.cmake

  Add the installation prefix of "curl" to CMAKE_PREFIX_PATH or set
  "curl_DIR" to a directory containing one of the above files.  If "curl"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
@Aaron1011
Copy link
Contributor

@emilis: It turns out that (at least on Ubuntu) the CMake file for Curl is called FindCURL, not Findcurl. If you change curl to CURL on line 26, cmake should work.

A side note: After changing this, I still couldn't compile the auth branch. strlcat was undefined in auth.c. I tried installing libbsd-dev, but it didn't work.

@emilis
Copy link
Contributor Author

emilis commented Jan 8, 2014

@Aaron1011 fogleman already fixed the CURL dependency.

Now I am also stuck with the libbsd problem. Searched a little bit: it seems there is no Find...cmake file for libbsd. Not sure how to work around this, since I have no experience with CMake.

@fogleman
Copy link
Owner

fogleman commented Jan 8, 2014

Don't worry about libbsd, I'll use something other than strlcat

@emilis
Copy link
Contributor Author

emilis commented Jan 8, 2014

@fogleman Was searching for some CMake hack. Stopped searching. Now waiting for a commit :)

@emilis
Copy link
Contributor Author

emilis commented Jan 9, 2014

Fixed, so closing.

@emilis emilis closed this as completed Jan 9, 2014
@matthewhegarty
Copy link

I have a similar CURL problem on Linux Mint 14 (I have curl installed)

09d0fdb

cmake .

-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Using X11 for window creation
-- Using GLX for context creation
CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-2.8/Modules/FindCURL.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:26 (find_package)

To solve had to install libcurl:

sudo apt-get install libcurl4-openssl-dev

@FanChael
Copy link

Hello, I build it success as your tip! But when I use ./craft to run it on ubuntu12.04 LTS, occured Segmentation fault (core dumped), how to solve it ? thank you!

hl@lilei:/myworld/Craft$ ls
builder.py cmake_install.cmake deps README.md src world.pyc
CMakeCache.txt CMakeLists.txt LICENSE.md server.py textures
CMakeFiles craft Makefile shaders world.py
hl@lilei:
/myworld/Craft$ ./craft
Segmentation fault (core dumped)
hl@lilei:~/myworld/Craft$

@crazy2be
Copy link

@FanChael Could you provide a backtrace or core dump? Might help in reproducing the problem.

Simplest way is to

gdb ./craft
> run
Segmentation fault (core dumped)
> bt

(although I'm not sure the makefile compiles in debug symbols by default, so you might have to change that too.)

@WyomingWill
Copy link

I have the same problem. Compiled on Ubuntu 12.04 and the program immediately crashes with a segmentation violation. Here is some info, as per the request above (I added the -g flag when compiling).

BOLO: gdb ./craft
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
http://bugs.launchpad.net/gdb-linaro/...
Reading symbols from /home/me/bin/Craft/craft...done.
(gdb) run
Starting program: /home/me/bin/Craft/craft
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x08080382 in make_shader (type=35633,
source=0x8489ab8 "#version 120\n\nuniform mat4 matrix;\nuniform vec3 camera;\nuniform float fog_distance;\nuniform int ortho;\n\nattribute vec4 position;\nattribute vec3 normal;\nattribute vec4 uv;\n\nvarying vec2 fragment_uv;\nva"...)
at /home/me/bin/Craft/src/util.c:65
#2 0x080805f1 in load_shader (path=0x815d40e "shaders/block_vertex.glsl", type=35633)
at /home/me/bin/Craft/src/util.c:83
#3 load_program (path1=0x815d40e "shaders/block_vertex.glsl", path2=0x815d3f2 "shaders/block_fragment.glsl")
at /home/me/bin/Craft/src/util.c:111
#4 0x0807ace6 in main (argc=1, argv=0xbffff2e4) at /home/me/bin/Craft/src/main.c:2661
(gdb)

I'd love to get this working to do some hobby AI... ;-) Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants