phptdlib: Error "install FILES given no DESTINATION"

I have errors during the compilation of phptdlib. I use a MacOS HighSierra v. 10.13.6.

-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR) 
CMake Warning at modules/td/CMakeLists.txt:249 (message):
  Not found OpenSSL: skip TDLib, tdactor, tdnet, tddb

-- Using the single-header code from /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/modules/json/single_include/
CMake Error at CMakeLists.txt:175 (install):
  install FILES given no DESTINATION!

-- Configuring incomplete, errors occurred!

The first error (OPEN SSL) managed to solve it with:

cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ ..

But the error “install FILES given no DESTINATION!” I do not know what can be caused or how to solve it.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (4 by maintainers)

Most upvoted comments

@DavidCima and one more thing to try.

Find the following fragment in CMakeLists.txt

if(APPLE)
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
endif()

and replace it with

if(APPLE)
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")

    set(BUNDLE_EXTENSION ".so")
    add_library(${EXT_NAME} MODULE ${SOURCE_FILES})
    set_target_properties(${EXT_NAME} PROPERTIES BUNDLE TRUE)
else()
    add_library(${EXT_NAME} SHARED ${SOURCE_FILES})
endif()

I have no Mac so I cannot try it by myself currently.

Well, I have managed to solve the problems with write permissions in the / usr / lib / php / extensions / no-debug-non-zts-20160303 folder.

It has been really difficult since my system did not allow me to change the read to write permission. In case someone else happens, this is what you need to do:

  • Restart the MAC.
  • During the restart, press CMD + R.
  • When the system options appear, go to “Utilities-> terminal” and type: csrutil disable and then reboot.
  • Now you can modify the permissions.

Once the writing is allowed, I execute “sudo make install” and it compiles well, at least in appearance.

install

tdlib

I modify my “php.ini” file by adding the line extension = tdlib.dylib

php -i | grep tdlib
php ../php_examples/func.php

and then I get this error …

Mac:build davidgarcia$ php -i | grep tdlib
PWD => /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/build
$_SERVER['PWD'] => /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/build
$_ENV['PWD'] => /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/build
Mac:build davidgarcia$ php ../php_examples/func.php

Fatal error: Uncaught Error: Call to undefined function td_json_client_create() in /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/php_examples/func.php:8
Stack trace:
#0 {main}
  thrown in /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/php_examples/func.php on line 8
Mac:build davidgarcia$ php ../php_examples/func.php

Fatal error: Uncaught Error: Call to undefined function td_json_client_create() in /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/php_examples/func.php:8
Stack trace:
#0 {main}
  thrown in /Applications/MAMP/htdocs/TelegramRecorder/phptdlib/php_examples/func.php on line 8

Hi @maxvgi @yaroslavche It seems that after the last “commit” the problem with the command has been solved and it no longer throws the error: “Undefined symbols for architecture x86_64.”

make make

directory tree “build” build

However now it throws me another error when I run “sudo make install”: sudo_make_install

It occurs to me that maybe it is a problem with the write permissions. I will check and comment on the result. No doubt it seems that we are on the right track.

@DavidCima, did you try to build the project after the latest cc8ebc3 commit?

Hi, @DavidCima It seems that there is a bug in CMakeLists.txt

I will try to fix it. For now, please send me output of command php-config --configure-options

I am intrested in --with-config-file-scan-dir= option.