ptitSeb / friking-shark

Port of Friking Shark (remake of Flying Shark) on the OpenPandora, Odroid and most Linux. Also with AmigaOS4 support. Status: Working (using gl4es).
https://boards.openpandora.org/topic/5600375-friking-shark/
Other
11 stars 0 forks source link

Could not find X11 lib with xlib-dev installed #14

Closed GoogleCodeExporter closed 6 years ago

GoogleCodeExporter commented 8 years ago
cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/local/share/cmake-2.8/Modules/FindX11.cmake:381 (MESSAGE):
  Could not find X11
Call Stack (most recent call first):
  CMakeLists.txt:11 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!

Original issue reported on code.google.com by javierma...@gmail.com on 11 Nov 2011 at 1:45

GoogleCodeExporter commented 8 years ago
I'm the one that is having this issue. I am using Ubuntu 11.04 (32-bit)
I tried removing FIND_PACKAGE ( X11 REQUIRED ) from CMakeLists.txt (Not that 
that would do anything, but it was worth a try) and I cmake outputted this:

-- Could NOT find ZLIB (missing:  ZLIB_LIBRARY) (found version "1.2.3.4")
CMake Error at 
/usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 
(MESSAGE):
  Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-2.8/Modules/FindPNG.cmake:59 (find_package_handle_standard_args)
  CMakeLists.txt:14 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!

so I removed FIND_PACKAGE ( PNG REQUIRED ) and cmake outputted this:

CMake Error: The following variables are used in this project, but they are set 
to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake 
files:
XINERAMA_LIBRARY
    linked by target "GameGraphics" in directory /home/pizzadude/Desktop/friking-shark-read-only
XRANDR_LIBARY
    linked by target "GameGraphics" in directory /home/pizzadude/Desktop/friking-shark-read-only

-- Configuring incomplete, errors occurred!

I didn't expect removing lines from the text file would make it work, but I 
wanted to see what it would output. This is odd to me as I have all the 
required dependencies that you listed.

Original comment by pizzal...@gmail.com on 11 Nov 2011 at 2:05

GoogleCodeExporter commented 8 years ago
If xlib-dev is installed, i don't know why it does not found it, i have to 
investigate it further.

I have checked the dependency list in Readme.txt and it is quite old... sorry

        mesa-libGL-devel.i386 
        mesa-libGLU-devel.i386
        libXrandr-devel.i386
        libopenal-dev 
        libalut-dev
        libogg-dev
        libvorbis-dev

You also have to install at least 

        libpng-dev
        libxinerama-dev

Try installing those before we move on.

Original comment by javierma...@gmail.com on 11 Nov 2011 at 2:30

GoogleCodeExporter commented 8 years ago
I have libpng-dev and libxinerama-dev installed, but they have different names. 
When I search xlib-dev with aptitude, here are the the packages it shows:

p   libmixlib-authentication-ruby   - Ruby mixin client/server header signing au
p   libmixlib-authentication-ruby1. - Ruby mixin client/server header signing au
p   libmixlib-cli-ruby              - A Ruby mixin for creating command line app
p   libmixlib-cli-ruby1.8           - A Ruby 1.8 mixin for creating command line
p   libmixlib-cli-ruby1.9.1         - A Ruby 1.9.1 mixin for creating command li
p   libmixlib-config-ruby           - a simple class based config mechanism for 
p   libmixlib-config-ruby1.8        - a simple class based config mechanism for 
p   libmixlib-log-ruby              - A simple Ruby mixin for creating a logger 
p   libmixlib-log-ruby1.8           - A simple Ruby 1.8 mixin for creating a log
p   pxlib-dev                       - library to read/write Paradox database fil
p   pxlib1                          - library to read/write Paradox database fil
p   python-xlib                     - Interface for Python to the X11 Protocol  
v   xlibmesa-glu-dev                -                                           
v   xlibosmesa-dev                  -                                           

Which one of these are you talking about?

Original comment by pizzal...@gmail.com on 11 Nov 2011 at 1:00

GoogleCodeExporter commented 8 years ago
Can you run cmake in trace mode?, i'm no cmake expert, but maybe it can give us 
some info.

cmake --trace . 2> trace.log

Original comment by javierma...@gmail.com on 11 Nov 2011 at 2:59

GoogleCodeExporter commented 8 years ago
Here it is. There are almost 500 lines though. :/
http://pastebin.com/bKaSTizu

Original comment by pizzal...@gmail.com on 11 Nov 2011 at 5:45

GoogleCodeExporter commented 8 years ago
Thanks for the traces

I have to check them agains FindX11.cmake.

I hope i can tell you something today or maybe tomorrow-

Original comment by javierma...@gmail.com on 11 Nov 2011 at 7:19

GoogleCodeExporter commented 8 years ago
Okay. Let me know if you find the fix.

Original comment by pizzal...@gmail.com on 13 Nov 2011 at 7:22

GoogleCodeExporter commented 8 years ago
Hi, sorry for the dekay,

It seems that cmake find the include paths for X11 but cannot find the 
libraries.

It is searching for an "X11" folder in:

    /usr/pkg/xorg/lib
    /usr/X11R6/lib
    /usr/X11R7/lib
    /usr/openwin/lib 

and finds nothing,

Can you search your system for X11 folders that include libraries?

Original comment by javierma...@gmail.com on 14 Nov 2011 at 1:43

GoogleCodeExporter commented 8 years ago
I searched for folders that contain the text "X11"

Here are some of them:

/usr/share/X11
/usr/lib/X11
/usr/bin/X11
/etc/X11

Original comment by pizzal...@gmail.com on 14 Nov 2011 at 6:18

GoogleCodeExporter commented 8 years ago
For some reason, i don't know really why, cmake is not looking into /usr/lib.

I do not know if this is the right way to do this but,

Can you edit your FindX11.cmake (mine is in usr/share/cmake/Modules/) and add 
/usr/lib to the path, something like this:  

SET(X11_LIB_SEARCH_PATH
    /usr/pkg/xorg/lib
    /usr/X11R6/lib
    /usr/X11R7/lib
    /usr/openwin/lib
    /usr/lib
  )

If this works for x11, it maybe works for the remaining libs.

I suppose this problem has something to do with you compiler include/lib 
folders or something like that, and surely there is a cleaner solution, but 
have litte experience using cmake, sorry :(

Original comment by javierma...@gmail.com on 14 Nov 2011 at 6:31

GoogleCodeExporter commented 8 years ago
I tried it, but it didn't work. :/
I'm guessing you are out of things to try? :S
Thanks for putting your time in trying to help, though.

Original comment by pizzal...@gmail.com on 16 Nov 2011 at 2:42

GoogleCodeExporter commented 8 years ago
This maybe need X11-devel. You could try this:
# yum search X11-devel
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
============================ N/S Matched: X11-devel ============================
libX11-devel.i686 : Development files for libX11
libX11-devel.x86_64 : Development files for libX11

then install it:
#yum install libX11-level

Hope it works.

Original comment by zma...@gmail.com on 20 Dec 2011 at 11:05

GoogleCodeExporter commented 8 years ago

Original comment by javierma...@gmail.com on 20 Dec 2011 at 10:45

ptitSeb commented 6 years ago

Working on x86_64 Linux (Mint 18.3), Pandora and ODroid.