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

CMake compile error #52

Closed
klausenbusk opened this issue Jan 24, 2017 · 9 comments
Closed

CMake compile error #52

klausenbusk opened this issue Jan 24, 2017 · 9 comments

Comments

@klausenbusk
Copy link

Hello

Something has changed recently, as I can't compile master anymore.
I have a git pull (4a2d782) which compile without any problems, but current HEAD doesn't.

[kristian@arch-hp-laptop build]$ cmake ..
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
DevIL, 64 bit compiler detected
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.28") 
-- Found JPEG: /usr/lib64/libjpeg.so  
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.7") 
-- Found Jasper: /usr/lib64/libjasper.so (found version "2.0.10") 
-- Could not find libSquish
CMake Warning at src-IL/CMakeLists.txt:106 (find_package):
  By not providing "FindNVTT.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "NVTT", but
  CMake did not find one.

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

    NVTTConfig.cmake
    nvtt-config.cmake

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


CMake Warning at src-IL/CMakeLists.txt:112 (find_package):
  By not providing "FindOpenEXR.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenEXR", but
  CMake did not find one.

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

    OpenEXRConfig.cmake
    openexr-config.cmake

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


-- Found LCMS2: /usr/lib64/liblcms2.so  
 
64 bit compiler detected
 
64 bit compiler detected
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/DevIL/DevIL/build
[kristian@arch-hp-laptop build]$ make
Scanning dependencies of target IL
[  0%] Building CXX object src-IL/CMakeFiles/IL.dir/src/altivec_common.cpp.o
[  1%] Building CXX object src-IL/CMakeFiles/IL.dir/src/altivec_typeconversion.cpp.o
[  2%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_alloc.cpp.o
[  3%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_bits.cpp.o
[  4%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_blp.cpp.o
[  5%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_bmp.cpp.o
[  6%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_convbuff.cpp.o
[  7%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_convert.cpp.o
[  8%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_cut.cpp.o
[  8%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_dcx.cpp.o
[  9%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_dds-save.cpp.o
[ 10%] Building CXX object src-IL/CMakeFiles/IL.dir/src/il_dds.cpp.o
/tmp/DevIL/DevIL/src-IL/src/il_dds.cpp:635:28: fejl: »_In_« was not declared in this scope
 static size_t BitsPerPixel(_In_ DXGI_FORMAT fmt)
                            ^~~~
make[2]: *** [src-IL/CMakeFiles/IL.dir/build.make:327: src-IL/CMakeFiles/IL.dir/src/il_dds.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: src-IL/CMakeFiles/IL.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
@abma
Copy link
Contributor

abma commented Jan 26, 2017

should be fixed with
d7583b1

@klausenbusk
Copy link
Author

@abma great, I will test when I get home :) A side question, do you know how I disable ex. jpeg support? I tried cmake -DIL_NO_JPG=1 but it still links with libjpeg. I need to include DevIL at a static library, and so I want to reduce the amount of library I need to compile static.

@abma
Copy link
Contributor

abma commented Jan 27, 2017

afaik cmake -DIL_JPEG_LIB=OFF

@abma
Copy link
Contributor

abma commented Jan 27, 2017

@klausenbusk
Copy link
Author

-DIL_NO_JPG=1 looks ok

It still seems to link:

[kristian@arch-hp-laptop build]$ cmake -DIL_NO_JPG=1 ..
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
DevIL, 64 bit compiler detected
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.28") 
-- Found JPEG: /usr/lib64/libjpeg.so  
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.7") 
-- Found Jasper: /usr/lib64/libjasper.so (found version "2.0.10") 
-- Could not find libSquish
-- Found LCMS2: /usr/lib64/liblcms2.so  
 
64 bit compiler detected
 
64 bit compiler detected
-- Could NOT find cppunit (missing:  CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR) 
-- UnitTest disabled, cppunit wasn't found!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kristian/Hentninger/DevIL/DevIL/build
-- Build files have been written to: /home/kristian/Hentninger/DevIL/DevIL/build
[kristian@arch-hp-laptop build]$ make
Scanning dependencies of target IL
[  0%] Building CXX object src-IL/CMakeFiles/IL.dir/src/altivec_common.cpp.o
[....]
[100%] Linking CXX shared library ../lib/x64/libILUT.so
[100%] Built target ILUT
[kristian@arch-hp-laptop build]$ ldd lib/x64/*.so | grep libjpeg
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007fd6e0956000)
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f456d27f000)
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f3453b93000)

so I'm wondering if something is broken in the cmake script.

@abma
Copy link
Contributor

abma commented Jan 29, 2017

IMHO you should open a new issue for that.

@klausenbusk
Copy link
Author

IMHO you should open a new issue for that.

You correct :) I have opened a new one now #53

@abma
Copy link
Contributor

abma commented Jan 30, 2017

@klausenbusk

is this issue fixed with the most recent changes? if so, please close this issue.

@klausenbusk
Copy link
Author

klausenbusk commented Jan 30, 2017

is this issue fixed with the most recent changes? if so, please close this issue.

It is, I didn't see the PR was merged, thanks for notifying me :)

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

2 participants