bitdream / aseprite

Automatically exported from code.google.com/p/aseprite
0 stars 0 forks source link

Build problem on Linux #307

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download latest source from GitHub (5th Jan 2014) & unpack
2. mkdir build && cd build && cmake ../aseprite  
3. make

What is the expected output? What do you see instead?
Expect successful build but see:
Linking CXX executable grid_ui_unittest
../lib/liblibpng.a(png.c.o): In function `png_reset_crc':
/home/peter/aseprite/third_party/libpng/png.c:111: undefined reference to 
`crc32'
Followed by many similar errors

What version of the product are you using? On what operating system?
Latest source from GitHub (5th Jan 2014)
Xubuntu 13.10, i386

This seems to be because libz is given before libpng  in the dependencies.
In CMakeLists.txt I moved the stanza starting `if(USE_SHARED_ZLIB)` to after 
the one starting `if(USE_SHARED_LIBPNG)` and the error disappeared.

Original issue reported on code.google.com by peterhul...@gmail.com on 5 Jan 2014 at 8:06

GoogleCodeExporter commented 9 years ago
CMakeLists.txt =! aseprite-1.0.1/CMakeLists.txt <=== not edit this

aseprite-1.0.1/scr/CMakeLists.txt <=== edit this!!!

////////////////////////////////////////////

STEP 1:

if(USE_SHARED_ZLIB)
  find_package(ZLIB)
  if(ZLIB_FOUND)
    set(libs3rdparty ${libs3rdparty} ${ZLIB_LIBRARIES})
    include_directories(${ZLIB_INCLUDE_DIR})
  endif(ZLIB_FOUND)
else()
  set(libs3rdparty ${libs3rdparty} zlib)
  include_directories(${ZLIB_DIR})
endif()

if(USE_SHARED_LIBPNG)
  find_package(PNG)
  if(PNG_FOUND)
    set(libs3rdparty ${libs3rdparty} ${PNG_LIBRARIES})
    add_definitions(${PNG_DEFINITIONS})
    include_directories(${PNG_INCLUDE_DIR})
  endif(PNG_FOUND)
else()
  set(libs3rdparty ${libs3rdparty} libpng)
endif()

/////////////////////////////////////

STEP 2:

if(USE_SHARED_LIBPNG)
  find_package(PNG)
  if(PNG_FOUND)
    set(libs3rdparty ${libs3rdparty} ${PNG_LIBRARIES})
    add_definitions(${PNG_DEFINITIONS})
    include_directories(${PNG_INCLUDE_DIR})
  endif(PNG_FOUND)
else()
  set(libs3rdparty ${libs3rdparty} libpng)
endif()

if(USE_SHARED_ZLIB)
  find_package(ZLIB)
  if(ZLIB_FOUND)
    set(libs3rdparty ${libs3rdparty} ${ZLIB_LIBRARIES})
    include_directories(${ZLIB_INCLUDE_DIR})
  endif(ZLIB_FOUND)
else()
  set(libs3rdparty ${libs3rdparty} zlib)
  include_directories(${ZLIB_DIR})
endif()

/////////////////////////////////////

then continue with instruction of INSTALL.md

Original comment by pablo176...@gmail.com on 13 Jun 2014 at 2:16

GoogleCodeExporter commented 9 years ago

Original comment by davidcapello on 17 Jul 2014 at 3:30