3dfsb-dev / 3dfsb

3D File System Browser - improved, cleaned up and maintained fork of the old tdfsb
GNU General Public License v2.0
96 stars 10 forks source link

Ubuntu 16.04, compile.sh completes, no binary. Manual compile = error (Xflush?) #14

Open morgancoxuk opened 7 years ago

morgancoxuk commented 7 years ago

Hi.

I am running kde-neon (ubuntu 16.04 based), I had to install deps not mentioned in the readme so the compile script would complete - i.e from https://github.com/3dfsb-dev/3dfsb/issues/13

Once installed the script now runs, however there , there is an error and no resulting binary..

i.e

$ ./compile.sh
Usage: ./compile.sh [i386]
Add the i386 option to compile for 32-bit (i386) architectures on a 64-bit machine
Using sdl-config.
Converting built-in images to XPM format with imagemagick's 'mogrify' tool...
Converting other built-in files to .h file format with the xxd tool...
GNU/Linux detected.
Compiling...3dfsb.c:216:43: error: initialization makes integer from pointer without a cast [-Wint-conversion]
 pthread_t async_load_textures_thread_id = NULL;
                                           ^
done.
Now run the 3D File System Browser with ./3dfsb

I then (after make clean), tried to compile manually - i.e 'cmake . ; make'

 cmake .
-- libmagic version: 5.25
-- Found LibM: /usr/lib/x86_64-linux-gnu/libm.so
-- Configuring done
CMake Warning (dev) at CMakeLists.txt:71 (add_dependencies):
  Policy CMP0046 is not set: Error on non-existent dependency in
  add_dependencies.  Run "cmake --help-policy CMP0046" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The dependency target "images" of target "3dfsb" does not exist.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/mcox/src/git/3dfsb

I can see it errors on 'make'

[100%] Linking C executable 3dfsb
/usr/bin/ld: libinput.a(input.c.o): undefined reference to symbol 'XFlush'
/usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/3dfsb.dir/build.make:112: recipe for target '3dfsb' failed
make[2]: *** [3dfsb] Error 1
CMakeFiles/Makefile2:71: recipe for target 'CMakeFiles/3dfsb.dir/all' failed
make[1]: *** [CMakeFiles/3dfsb.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Any ideas how to make it compile correctly?

kargaroc commented 7 years ago

I get this same problem on Arch.

tomvanbraeckel commented 7 years ago

Fixed with commit 358b301435a9ed6b15a60cb7a5037528541f26cb. Thanks for reporting! Could you try compiling with the ./compile.sh script again, just to confirm that it compiles now?