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

Update PHP module docs #1174

Closed
mandito67 opened this issue Aug 3, 2016 · 21 comments
Closed

Update PHP module docs #1174

mandito67 opened this issue Aug 3, 2016 · 21 comments
Milestone

Comments

@mandito67
Copy link

Hello!

I'm trying to install PHP wrapper on linux server. In the installation instructions from this site: http://www.coolprop.org/coolprop/wrappers/PHP/index.html says to create de module with
cmake .. -DCOOLPROP_PHP_MODULE=ON but it returns two errors on line 830 and 831. Somewhere on the net I found to add "" to the variable ${php_config_includes} in both lines and this returns no errors, but when building with make VERBOSE=1 it cant find the CoolProp/build/src folder

please any suggestion??

@ibell
Copy link
Contributor

ibell commented Aug 3, 2016

Please provide a complete build log so we can debug

On Wed, Aug 3, 2016 at 2:29 AM, mandito67 notifications@github.com wrote:

Hello!

I'm trying to install PHP wrapper on linux server. In the installation
instructions from this site:
http://www.coolprop.org/coolprop/wrappers/PHP/index.html says to create
de module with
cmake .. -DCOOLPROP_PHP_MODULE=ON but it returns two errors on line 830
and 831. Somewhere on the net I found to add "" to the variable
${php_config_includes} in both lines and this returns no errors, but when
building with make VERBOSE=1 it cant find the CoolProp/build/src folder

please any suggestion??


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1174, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABxhazoo0awfVKgXDnXkRULi3KRgl8weks5qcFF8gaJpZM4JbbD7
.

@mandito67
Copy link
Author

This is the code on the CMakeLists.txt where variables have to be quoted for returning no errors.

if (COOLPROP_PHP_MODULE)

Must have SWIG

FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})

execute_process(
COMMAND php-config --includes
OUTPUT_VARIABLE php_config_includes
RESULT_VARIABLE php_config_failed
)
string(STRIP "${php_config_includes}" php_config_includes)
string(REPLACE "-I" "" PHP_INCLUDES "${php_config_includes}")
SEPARATE_ARGUMENTS(PHP_INCLUDES)

message(STATUS "php includes=${PHP_INCLUDES}")
include_directories(${PHP_INCLUDES})

add_definitions(-DNO_ERROR_CATCHING) #disable internal error catching and allow swig to do the error catching itself

set(I_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/CoolProp.i")

set(SWIG_OPTIONS "${COOLPROP_SWIG_OPTIONS}")
string(REPLACE " " ";" SWIG_OPTIONS "${SWIG_OPTIONS}")
SET_SOURCE_FILES_PROPERTIES(${I_FILE} PROPERTIES SWIG_FLAGS "${SWIG_OPTIONS}")
SET_SOURCE_FILES_PROPERTIES(${I_FILE} PROPERTIES CPLUSPLUS ON)

SET(SWIG_MODULE_CoolProp_EXTRA_DEPS ${SWIG_DEPENDENCIES})
SWIG_ADD_MODULE(CoolProp php ${I_FILE} ${APP_SOURCES})

if (WIN32)
set_target_properties(CoolProp PROPERTIES PREFIX "")
endif()

if (NOT MSVC)
set_target_properties(CoolProp PROPERTIES COMPILE_FLAGS "-m${BITNESS}" LINK_FLAGS "-m${BITNESS}")
endif()
add_dependencies (CoolProp generate_headers)

install (FILES ${CMAKE_CURRENT_BINARY_DIR}/CoolProp.php DESTINATION ${CMAKE_INSTALL_PREFIX}/PHP/cross-platform)
install (TARGETS ${app_name} DESTINATION ${CMAKE_INSTALL_PREFIX}/PHP/${CMAKE_SYSTEM_NAME})

endif()

@ibell
Copy link
Contributor

ibell commented Aug 4, 2016

That push should have fixed the quote escaping, can you please provide a full build log of your attempts to build PHP wrapper? It works on our build server... http://www.coolprop.dreamhosters.com:8010/builders/PHP-linux/builds/1599

@mandito67
Copy link
Author

for background, I'm working on a AWS Linux instance. I connect to the vm with cmd and cygwin plugins. This is teh error I get when trying:

[ec2-user@ip-xx-xx-xx-xx build]$ cmake .. -DCOOLPROP_PHP_MODULE=ON
-- COOLPROP_INSTALL_PREFIX=/home/ec2-user/CoolProp/install_root
-- CoolProp version: 6.0.1dev
CMake Error at CakeLists.txt:830 (string):
string sub-command STRIP requires two arguments.

CMake Error at CakeLists.txt:831 (string):
string sub-command REPLACE requires at least four arguments.

-- php includes=
-- Configuring incomplete, errors ocurred!
See also "/home/ec2-user/CoolProp/build/CMakeFiles/CMakeOutput.log".

@ibell
Copy link
Contributor

ibell commented Aug 5, 2016

Did you pull the updated CMakeLists.txt? Hopefully that error should be fixed with my commit: cf74ce3

@ibell
Copy link
Contributor

ibell commented Aug 5, 2016

Also, make sure you pull the submodules again.

@mandito67
Copy link
Author

Hello Ian, I've been asking around and somebody told me maybe it is related to the Linux version I'm using. I'm working with Amazon Linux AMI instance on AWS/EC2. What Linux do you use to check it out??

@ibell
Copy link
Contributor

ibell commented Aug 10, 2016

  1. Did you do a git pull to update CMakeLists.txt?
  2. I use xubuntu, and you should definitely test it all on your computer before you try on AWS

A full build log could be useful!

@mandito67
Copy link
Author

On ubuntu server, this is the CMakeError.log

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:

The output was:
No such file or directory

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c

The output was:
No such file or directory

Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags:

The output was:
No such file or directory

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: CMAKE_CXX_COMPILER-NOTFOUND
Build flags:
Id flags: -c

The output was:
No such file or directory

Checking whether the CXX compiler is IAR using "" did not match "IAR .+ Compiler":

@mandito67
Copy link
Author

On ubuntu server, this is the CMakeOutput.log

The system is: Linux - 3.13.0-91-generic - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /usr/bin/cc
Build flags:
Id flags:

The output was:
0

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"

The C compiler identification is GNU, found in "/home/ubuntu/CoolProp/build/CMakeFiles/2.8.12.2/CompilerIdC/a.out"

Determining if the C compiler works passed with the following output:
Change Dir: /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec4148629187/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec4148629187.dir/build.make CMakeFiles/cmTryCompileExec4148629187.dir/build
make[1]: Entering directory /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec4148629187.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec4148629187.dir/testCCompiler.c.o -c /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTryCompileExec4148629187 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec4148629187.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTryCompileExec4148629187.dir/testCCompiler.c.o -o cmTryCompileExec4148629187 -rdynamic make[1]: Leaving directory/home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp'

Detecting C compiler ABI info compiled with the following output:
Change Dir: /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec2041783739/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec2041783739.dir/build.make CMakeFiles/cmTryCompileExec2041783739.dir/build
make[1]: Entering directory /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp' /usr/bin/cmake -E cmake_progress_report /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o /usr/bin/cc -o CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-2.8/Modules/CMakeCCompilerABI.c Linking C executable cmTryCompileExec2041783739 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2041783739.dir/link.txt --verbose=1 /usr/bin/cc -v CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o -o cmTryCompileExec2041783739 -rdynamic Using built-in specs. COLLECT_GCC=/usr/bin/cc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec2041783739' '-rdynamic' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTryCompileExec2041783739 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o make[1]: Leaving directory/home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp'

Parsed C implicit link information from above output:
link line regex: [^( _|._[/])(ld|([^/]+-)?ld|collect2)[^/]*( |$)]
ignore line: [Change Dir: /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command:/usr/bin/make "cmTryCompileExec2041783739/fast"]
ignore line: [/usr/bin/make -f CMakeFiles/cmTryCompileExec2041783739.dir/build.make CMakeFiles/cmTryCompileExec2041783739.dir/build]
ignore line: [make[1]: Entering directory `/home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp']
ignore line: [/usr/bin/cmake -E cmake_progress_report /home/ubuntu/CoolProp/build/CMakeFiles/CMakeTmp/CMakeFiles 1]
ignore line: [Building C object CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o]
ignore line: [/usr/bin/cc -o CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-2.8/Modules/CMakeCCompilerABI.c]
ignore line: [Linking C executable cmTryCompileExec2041783739]
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec2041783739.dir/link.txt --verbose=1]
ignore line: [/usr/bin/cc -v CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o -o cmTryCompileExec2041783739 -rdynamic ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=/usr/bin/cc]
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper]
ignore line: [Target: x86_64-linux-gnu]
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu114.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
ignore line: [Thread model: posix]
ignore line: [gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1
14.04.3) ]
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/]
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/:/usr/lib/]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTryCompileExec2041783739' '-rdynamic' '-mtune=generic' '-march=x86-64']
link line: [ /usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTryCompileExec2041783739 /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o]
arg [/usr/lib/gcc/x86_64-linux-gnu/4.8/collect2] ==> ignore
arg [--sysroot=/] ==> ignore
arg [--build-id] ==> ignore
arg [--eh-frame-hdr] ==> ignore
arg [-m] ==> ignore
arg [elf_x86_64] ==> ignore
arg [--hash-style=gnu] ==> ignore
arg [--as-needed] ==> ignore
arg [-export-dynamic] ==> ignore
arg [-dynamic-linker] ==> ignore
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
arg [-zrelro] ==> ignore
arg [-o] ==> ignore
arg [cmTryCompileExec2041783739] ==> ignore
arg [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o] ==> ignore
arg [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o] ==> ignore
arg [/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o] ==> ignore
arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.8] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.8]
arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu]
arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib]
arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
arg [-L/lib/../lib] ==> dir [/lib/../lib]
arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
arg [-L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..]
arg [CMakeFiles/cmTryCompileExec2041783739.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [-lgcc] ==> lib [gcc]
arg [--as-needed] ==> ignore
arg [-lgcc_s] ==> lib [gcc_s]
arg [--no-as-needed] ==> ignore
arg [-lc] ==> lib [c]
arg [-lgcc] ==> lib [gcc]
arg [--as-needed] ==> ignore
arg [-lgcc_s] ==> lib [gcc_s]
arg [--no-as-needed] ==> ignore
arg [/usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o] ==> ignore
arg [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o] ==> ignore
remove lib [gcc]
remove lib [gcc_s]
remove lib [gcc]
remove lib [gcc_s]
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/4.8] ==> [/usr/lib/gcc/x86_64-linux-gnu/4.8]
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib] ==> [/usr/lib]
collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
collapse library dir [/lib/../lib] ==> [/lib]
collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..] ==> [/usr/lib]
implicit libs: [c]
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/4.8;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
implicit fwks: []

@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

Can you please provide the full command line output, showing all the commands you ran and the associated output? A copy-paste from the terminal would be perfect.

@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

I followed the docs to the letter, I am on ubuntu 16.04 LTS with php5.6:

ian@ian-VirtualBox:~/Code/coolprop/build/php$ cmake ../.. -DCOOLPROP_PHP_MODULE=ON -DCMAKE_BUILD_TYPE=Release
-- COOLPROP_INSTALL_PREFIX=/home/ian/Code/coolprop/install_root
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- 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
-- CoolProp version: 6.0.1dev
-- Found PythonInterp: /home/ian/anaconda/bin/python2.7 (found suitable version "2.7.10", minimum required is "2.7") 
-- Found LibDL: /usr/lib/x86_64-linux-gnu/libdl.so  
-- Found SWIG: /usr/local/bin/swig (found version "3.0.10") 
-- php includes=/usr/include/php/20131226;/usr/include/php/20131226/main;/usr/include/php/20131226/TSRM;/usr/include/php/20131226/Zend;/usr/include/php/20131226/ext;/usr/include/php/20131226/ext/date/lib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ian/Code/coolprop/build/php
ian@ian-VirtualBox:~/Code/coolprop/build/php$ cmake --build .
Scanning dependencies of target generate_headers
cpversion.h is up to date
version written to hidden file: /home/ian/Code/coolprop/.version for use in builders that don't use git repo
git version 2.7.4
git is accessible at the command line
git revision is 2c598fe33a8fb7f0d46429b665bb6f854cdd6c35
gitrevision.h is up to date
all_fluids_JSON.h is up to date
all_incompressibles_JSON.h is up to date
mixture_departure_functions_JSON.h is up to date
mixture_binary_pairs_JSON.h is up to date
predefined_mixtures_JSON.h is up to date
all_cubics_JSON.h is up to date
cubic_fluids_schema_JSON.h is up to date
[  0%] Built target generate_headers
[  2%] Swig source
/home/ian/Code/coolprop/include/Configuration.h:182: Warning 312: Nested union not currently supported (ignored).
/home/ian/Code/coolprop/include/Configuration.h:76: Warning 503: Can't wrap 'operator bool' unless renamed to a valid identifier.
/home/ian/Code/coolprop/include/Configuration.h:78: Warning 503: Can't wrap 'operator double' unless renamed to a valid identifier.
/home/ian/Code/coolprop/include/Configuration.h:80: Warning 503: Can't wrap 'operator std::string' unless renamed to a valid identifier.
/home/ian/Code/coolprop/include/Configuration.h:100: Warning 509: Overloaded method CoolProp::ConfigurationItem::ConfigurationItem(configuration_keys,std::string const &) effectively ignored,
/home/ian/Code/coolprop/include/Configuration.h:96: Warning 509: as it is shadowed by CoolProp::ConfigurationItem::ConfigurationItem(configuration_keys,char const *).
Scanning dependencies of target CoolProp
[  4%] Building CXX object CMakeFiles/CoolProp.dir/CoolPropPHP_wrap.cxx.o
[  7%] Building CXX object CMakeFiles/CoolProp.dir/src/Ice.cpp.o
[  9%] Building CXX object CMakeFiles/CoolProp.dir/src/Helmholtz.cpp.o
[ 11%] Building CXX object CMakeFiles/CoolProp.dir/src/CPstrings.cpp.o
[ 14%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Incompressible/IncompressibleFluid.cpp.o
[ 16%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Incompressible/IncompressibleBackend.cpp.o
[ 19%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Incompressible/IncompressibleLibrary.cpp.o
[ 21%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/IF97/IF97Backend.cpp.o
[ 23%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/REFPROP/REFPROPBackend.cpp.o
[ 26%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/REFPROP/REFPROPMixtureBackend.cpp.o
[ 28%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Tabular/TTSEBackend.cpp.o
[ 30%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Tabular/TabularBackends.cpp.o
[ 33%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Tabular/BicubicBackend.cpp.o
[ 35%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/HelmholtzEOSBackend.cpp.o
[ 38%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/ReducingFunctions.cpp.o
[ 40%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/MixtureDerivatives.cpp.o
[ 42%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.cpp.o
[ 45%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/MixtureParameters.cpp.o
[ 47%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/Fluids/Ancillaries.cpp.o
[ 50%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/Fluids/FluidLibrary.cpp.o
[ 52%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/VLERoutines.cpp.o
[ 54%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/TransportRoutines.cpp.o
[ 57%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/FlashRoutines.cpp.o
[ 59%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Helmholtz/PhaseEnvelopeRoutines.cpp.o
[ 61%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Cubics/CubicBackend.cpp.o
[ 64%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Cubics/CubicsLibrary.cpp.o
[ 66%] Building CXX object CMakeFiles/CoolProp.dir/src/Backends/Cubics/GeneralizedCubic.cpp.o
[ 69%] Building CXX object CMakeFiles/CoolProp.dir/src/MatrixMath.cpp.o
[ 71%] Building CXX object CMakeFiles/CoolProp.dir/src/CoolPropTools.cpp.o
[ 73%] Building CXX object CMakeFiles/CoolProp.dir/src/Solvers.cpp.o
[ 76%] Building CXX object CMakeFiles/CoolProp.dir/src/Tests/TestObjects.cpp.o
[ 78%] Building CXX object CMakeFiles/CoolProp.dir/src/AbstractState.cpp.o
[ 80%] Building CXX object CMakeFiles/CoolProp.dir/src/Configuration.cpp.o
[ 83%] Building CXX object CMakeFiles/CoolProp.dir/src/SpeedTest.cpp.o
[ 85%] Building CXX object CMakeFiles/CoolProp.dir/src/CoolProp.cpp.o
[ 88%] Building CXX object CMakeFiles/CoolProp.dir/src/CPnumerics.cpp.o
[ 90%] Building CXX object CMakeFiles/CoolProp.dir/src/DataStructures.cpp.o
[ 92%] Building CXX object CMakeFiles/CoolProp.dir/src/HumidAirProp.cpp.o
[ 95%] Building CXX object CMakeFiles/CoolProp.dir/src/CPfilepaths.cpp.o
[ 97%] Building CXX object CMakeFiles/CoolProp.dir/src/PolyMath.cpp.o
[100%] Linking CXX shared module libCoolProp.so
[100%] Built target CoolProp
ian@ian-VirtualBox:~/Code/coolprop/build/php$ 

@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

I'd like to see a similar log for you.

@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

I updated the docs too: http://www.coolprop.org/dev/coolprop/wrappers/PHP/index.html#php (might need to wait a while for them)

@ibell ibell added this to the v6.1 milestone Aug 11, 2016
@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

Closing, reopen if it doesn't work for you.

@ibell ibell closed this as completed Aug 11, 2016
@mandito67
Copy link
Author

Hello Ian, I think it's working now. This is the output:

-- COOLPROP_INSTALL_PREFIX=/home/ubuntu/CoolProp/install_root
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- CoolProp version: 6.0.1dev
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")
-- Found LibDL: /usr/lib/x86_64-linux-gnu/libdl.so
-- Found SWIG: /usr/bin/swig2.0 (found version "2.0.11")
-- php includes=/usr/include/php/20131226;/usr/include/php/20131226/main;/usr/include/php/20131226/TSRM;/usr/include/php/20131226/Zend;/usr/include/php/20131226/ext;/usr/include/php/20131226/ext/date/lib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/CoolProp/build

Now I need to do some tests on php...let you know! thanks!!

@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

Good to hear!

@ibell
Copy link
Contributor

ibell commented Aug 11, 2016

In the future, please provide THE WHOLE build log, including the commands that you ran. Otherwise I need to guess what you actually did.

@mandito67
Copy link
Author

Sorry for that, I'm new on this, trying to catch up :)

@mandito67
Copy link
Author

error coolprop.txt
Ian, sorry for bother. Please check last 5 lines.

@mandito67
Copy link
Author

mandito67 commented Aug 11, 2016

Ian, working!! thanks a lot.
In the documentation website I think you have to change extension = "CoolProp.so" for libCoolProp.so
Thanks what I did and it works.

@ibell ibell reopened this Aug 21, 2016
@ibell ibell changed the title PHP module issue Update PHP module docs Aug 21, 2016
@ibell ibell closed this as completed in e21a27d Aug 24, 2016
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