shiyilei / protobuf-c

Automatically exported from code.google.com/p/protobuf-c
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

build with cmake fault #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. checkout trunk (rev316)
2. mkdir build && cd build && cmake ../

What is the expected output? What do you see instead?
Ready Makefile generated from cmake

What version of the product are you using? On what operating system?
URL: http://protobuf-c.googlecode.com/svn/trunk
Repository Root: http://protobuf-c.googlecode.com/svn
Repository UUID: 00440858-1255-0410-a3e6-75ea37f81c3a
Last Changed Author: lahiker42
Last Changed Rev: 316
Last Changed Date: 2011-04-21 18:45:02 +0200 (Thu, 21 Apr 2011)

Please provide any additional information below.

The problem is that README and protobuf-c-config.h.in files dont exist.

Output of 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
-- Found PROTOBUF: /usr/lib64/libprotobuf.so 
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Looking for include files HAVE_ALLOCA_H
-- Looking for include files HAVE_ALLOCA_H - found
-- Looking for include files HAVE_MALLOC_H
-- Looking for include files HAVE_MALLOC_H - found
-- Looking for include files HAVE_SYS_POLL_H
-- Looking for include files HAVE_SYS_POLL_H - found
-- Looking for include files HAVE_SYS_SELECT_H
-- Looking for include files HAVE_SYS_SELECT_H - found
-- Looking for include files HAVE_INTTYPES_H
-- Looking for include files HAVE_INTTYPES_H - found
-- Looking for include files HAVE_SYS_UIO_H
-- Looking for include files HAVE_SYS_UIO_H - found
-- Looking for include files HAVE_UNISTD_H
-- Looking for include files HAVE_UNISTD_H - found
-- Looking for include files HAVE_IO_H
-- Looking for include files HAVE_IO_H - not found.
-- 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
CMake Error: File 
/home/pawel/tmp/nio/protobuf-c-read-only/src/google/protobuf-c/protobuf-c-config
.h.in does not exist.
CMake Error at src/CMakeLists.txt:47 (configure_file):
  configure_file Problem configuring file

CMake Error at /usr/share/cmake/Modules/CPack.cmake:817 (message):
  CPack package description file:
  "/home/pawel/tmp/nio/protobuf-c-read-only/README" could not be found.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CPack.cmake:821 (cpack_check_file_exists)
  CMakeLists.txt:75 (include)

-- Configuring incomplete, errors occurred!

PD. dump fix of README:

pawel@pawel ~/tmp/nio/protobuf-c-read-only/build $ touch ../README
pawel@pawel ~/tmp/nio/protobuf-c-read-only/build $ cmake ../
CMake Error: File 
/home/pawel/tmp/nio/protobuf-c-read-only/src/google/protobuf-c/protobuf-c-config
.h.in does not exist.
CMake Error at src/CMakeLists.txt:47 (configure_file):
  configure_file Problem configuring file

-- Configuring incomplete, errors occurred!

PD. dump fix for protobuf-c/protobuf-c-config.h.in

pawel@pawel ~/tmp/nio/protobuf-c-read-only/build $ touch 
/home/pawel/tmp/nio/protobuf-c-read-only/src/google/protobuf-c/protobuf-c-config
.h.in
pawel@pawel ~/tmp/nio/protobuf-c-read-only/build $ cmake ../
-- Configuring done
-- Generating done
-- Build files have been written to: 
/home/pawel/tmp/nio/protobuf-c-read-only/build
pawel@pawel ~/tmp/nio/protobuf-c-read-only/build $ 

with empty protobuf-c-config.h.in compilation will fault.

A working protobuf-c-config.h.in for my is:
#ifndef protobuf-c-config_H
#define protobuf-c-config_H

#cmakedefine CMAKE_HAVE_PTHREAD_H 1
#cmakedefine HAVE_ALLOCA_H 1
#cmakedefine HAVE_MALLOC_H 1
#cmakedefine HAVE_SYS_POLL_H 1
#cmakedefine HAVE_SYS_SELECT_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_SYS_UIO_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_IO_H 1
#cmakedefine WIN32 1

#endif

cmake --version
cmake version 2.8.4

Original issue reported on code.google.com by pawe...@gmail.com on 11 Jul 2011 at 9:21

Attachments: