Comments (40)
what about the warnings that I have highlighted.
The warnings are expected, those recipes from ConanCenter still have some legacy code that needs to be removed.
from conan.
Thanks very much for the feedback @FaiqueAli
I am very happy that you made it work and could solve those issues with those recipes and QNX, great job.
Always happy to help, don't hesitate to create new issues for any further question you might have.
from conan.
Hi @FaiqueAli
It seems that you are not defining the build_type=Debug
in your host profile or command line, but then you are doing later a -DCMAKE_BUILD_TYPE=Debug
build. I think this would fix the issue.
Also, it is not clear how the Conan toolchain is being used, you are not using the Conan toolchain, generated with CMakeToolchain
, like -DCMAKE_TOOLCHAIN=.../conan_toolchain.cmake
but your own toolchain, but then the -- Conan
messages of the conan_toolchain.cmake
are printed on the output, so that looks good, but cannot be fully sure.
from conan.
Hi thanks for prompt rep,
I have updated the host profile also with build_type=Debug
but still getting same error..
Regarding conantoolchain.cmake I am not sure how to use it. I read article for cross compilation I need a toolchain, therefore I found this toolchain from QNX and trying to use this. it will be great if you could guid me how can I use conantoolchain.cmake.
Thanks :)
from conan.
Regarding conantoolchain.cmake I am not sure how to use it. I read article for cross compilation I need a toolchain, therefore I found this toolchain from QNX and trying to use this. it will be great if you could guid me how can I use conantoolchain.cmake.
The conan_toolchain.cmake
is intended to be used as the main toolchain for most cases, check https://docs.conan.io/2/tutorial/consuming_packages/build_simple_cmake_project.html
If you have a user toolchain that you want to add, it is possible to inject it with something like tools.cmake.cmaketoolchain:user_toolchain=[your_toolchain.cmake]
, you might find this example useful: https://docs.conan.io/2/examples/tools/cmake/cmake_toolchain/inject_cmake_variables.html
from conan.
Hi, after using the conantoolchain.cmake I am stil getting same error. below are the command sequence..
conan install .. --build missing --profile:build=default --profile:host=aarch64
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .
Ooutput
path/main.cpp:5:10: fatal error: restinio/core.hpp: No such file or directory #include <restinio/core.hpp> ^~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/QNX-restinio-app.dir/build.make:76: CMakeFiles/QNX-restinio-app.dir/main.cpp.o] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/QNX-restinio-app.dir/all] Error 2 gmake: *** [Makefile:91: all] Error 2
here is my Cmakelist.txt file
cmake_minimum_required(VERSION 3.10)
project(QNX-restinio-app)
include("${CMAKE_BINARY_DIR}/Debug/generators//conan_toolchain.cmake")
set(llhttp_DIR "${CMAKE_BINARY_DIR}/Debug/generators/")
set(fmt_DIR "${CMAKE_BINARY_DIR}/Debug/generators/")
set(expected-lite_DIR "${CMAKE_BINARY_DIR}/Debug/generators/")
set(asio_DIR "${CMAKE_BINARY_DIR}/Debug/generators/")
set(restinio_DIR "${CMAKE_BINARY_DIR}/Debug/generators/")
find_package(fmt REQUIRED)
find_package(llhttp REQUIRED)
find_package(expected-lite REQUIRED)
find_package(asio REQUIRED)
find_package(restinio REQUIRED)
include_directories ("/home/username/.conan2")
include_directories ("/home/username/.conan2/p/resti2478711f40029/p/include/restinio")
add_executable(QNX-restinio-app main.cpp)
target_link_libraries(QNX-restinio-app fmt::fmt)
target_link_libraries(QNX-restinio-app llhttp::llhttp)
target_link_libraries(QNX-restinio-app asio::asio)
target_link_libraries(QNX-restinio-app nonstd::expected-lite)
target_link_libraries(QNX-restinio-app restinio::restinio)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
from conan.
A few things:
The toolchains cannot be included as:
include("${CMAKE_BINARY_DIR}/Debug/generators//conan_toolchain.cmake")
They need to be passed in command line arguments (or from using CMake presets file)
Then, you shouldn't be doing:
include_directories ("/home/username/.conan2")
include_directories ("/home/username/.conan2/p/resti2478711f40029/p/include/restinio")
The include directories are already defined in the targets, so restinio::restinio
will contain it. Harcoding such a path as above, that might even change in different machines would be broken.
Similar with
set(llhttp_DIR "${CMAKE_BINARY_DIR}/Debug/generators/")
It shouldn't be necessary. It is specially bad, as it is hardcoding a Debug path, but the configuration might be Release.
We can start from something that works, for example:
$ conan new cmake_lib -d name=mypkg -d version=0.1 -d requires="restinio/[*]"
# add ``#include "restinio/core.hpp"`` in the src/mypkg.cpp source file
$ conan build . -s compiler.cppstd=17 # My default is 14, it might not be necessary in your case
This doesn't fail, and the mypkg
CMakeLists is just:
cmake_minimum_required(VERSION 3.15)
project(mypkg CXX)
find_package(restinio CONFIG REQUIRED)
add_library(mypkg src/mypkg.cpp)
target_include_directories(mypkg PUBLIC include)
target_link_libraries(mypkg PRIVATE restinio::restinio)
That is the find_package()
+ target_link_libraries
is enough to find the header correctly.
from conan.
So after updating my profile settings from Debug to Release, conan generated a Release folder instead of Debug, thats expected.
making changes in Cmakelist.txt file, it looks like
cmake_minimum_required(VERSION 3.10)
project(QNX-restinio-app)
set(llhttp_DIR "${CMAKE_BINARY_DIR}/Release/generators/")
set(fmt_DIR "${CMAKE_BINARY_DIR}/Release/generators/")
set(expected-lite_DIR "${CMAKE_BINARY_DIR}/Release/generators/")
set(asio_DIR "${CMAKE_BINARY_DIR}/Release/generators/")
set(restinio_DIR "${CMAKE_BINARY_DIR}/Release/generators/")
find_package(fmt REQUIRED)
find_package(llhttp REQUIRED)
find_package(expected-lite REQUIRED)
find_package(asio REQUIRED)
find_package(restinio CONFIG REQUIRED)
add_executable(QNX-restinio-app main.cpp)
add_library(QNX-restinio-app main.cpp)
target_include_directories(QNX-restinio-app PUBLIC include)
target_link_libraries(QNX-restinio-app fmt::fmt)
target_link_libraries(QNX-restinio-app llhttp::llhttp)
target_link_libraries(QNX-restinio-app asio::asio)
target_link_libraries(QNX-restinio-app nonstd::expected-lite)
target_link_libraries(QNX-restinio-app PRIVATE restinio::restinio)
#target_link_libraries(QNX-restinio-app ${CONAN_LIBS})
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)
after that I executed the command in the terminal, that you mentioned..
$ conan new cmake_lib -d name=QNX-restinio-app -d version=0.7.2 -d requires="restinio/[*]"
File saved: CMakeLists.txt
File saved: conanfile.py
File saved: include/QNX-restinio-app.h
File saved: src/QNX-restinio-app.cpp
File saved: test_package/CMakeLists.txt
File saved: test_package/conanfile.py
File saved: test_package/src/example.cpp
note: i mentioned here a restinio version as version=0.7.2
$ conan build . -s compiler.cppstd=17
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
.
.
.
ERROR: Missing prebuilt package for 'fmt/10.2.1'. You can try:
- List all available packages using 'conan list "fmt/10.2.1:*" -r=remote'
- Explain missing binaries: replace 'conan install ...' with 'conan graph explain ...'
- Try to build locally from sources using the '--build=fmt/10.2.1' argument
More Info at 'https://docs.conan.io/2/knowledge/faq.html#error-missing-prebuilt-package'
did I understood correctly ?
# add ``#include "restinio/core.hpp"`` in the src/mypkg.cpp source file
it is already included in the main.cpp file
please let me know if I am doing sth wrong..
from conan.
QNX-restinio-app
Note that Conan 2 does not allow package names with upper case. So this will fail the moment you try to create the package, please use lowercase names only.
Furthermore, it is also typical to not name apps based on the OS, the app is myapp
, and you can build it for qnx, but you might also build it for Linux-gcc normal native application.
compiler=qcc
It seems you have changed your default profile, instead of defining a specific qcc
profile.
Often, it is very useful to test things, specially proof of concepts, and setups, with the standard native system. And define specific technologies profiles in their own files. Note that profiles can also be managed with conan config install
to shared them in developer teams, and ensure that CI machines also have the same configuration.
add
#include "restinio/core.hpp"
in the src/mypkg.cpp source file
This is not possible, if you created the template I am talking about with conan new cmake_lib
those lines will not be there.
ERROR: Missing prebuilt package for 'fmt/10.2.1'. You can try:
This is expected, as your profile is using qcc
, ConanCenter does not have binaries for qnx, so they need to be built from source. The error message is suggesting to use --build=missing
to build them.
from conan.
ah ok,
Now I changed the name of the app to qnxrestinio
.
Second I added #include "restinio/core.hpp"
in the src/qnxrestinio.app file.
you mean I should also include --build missing parameter into $ conan build . -s compiler.cppstd=17 --build missing
command ?
so I also included that, so the command sequence is as below..
conan install .. --build missing --profile:build=default --profile:host=aarch64
conan new cmake_lib -d name=qnxrestinio -d version=0.7.2 -d requires="restinio/[*]"
conan build . -s compiler.cppstd=17 --build missing
but at the end I got list of errors like below..
$ conan build . -s compiler.cppstd=17 --build missing
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
======== Computing dependency graph ========
Graph root
conanfile.py (qnxrestinio/0.7.2): /home/user/QNX-restinio-app/build/conanfile.py
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
Resolved version ranges
restinio/[*]: restinio/0.7.2
======== Computing necessary packages ========
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d60b6954d6918b1b80923bbd011236e7ad7613d2 - Build
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:250c2e0b2d2f64dc22a93898fd824a6811ea523a#14d879427f9d87bf3d3750e26cc8b32f - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
-------- Installing package fmt/10.2.1 (3 of 5) --------
fmt/10.2.1: Building from source
fmt/10.2.1: Package fmt/10.2.1:d60b6954d6918b1b80923bbd011236e7ad7613d2
fmt/10.2.1: Copying sources to build folder
fmt/10.2.1: Building your package in /home/user/.conan2/p/b/fmtb084e263f2086/b
fmt/10.2.1: Calling generate()
fmt/10.2.1: Generators folder: /home/user/.conan2/p/b/fmtb084e263f2086/b/build/Release/generators
fmt/10.2.1: CMakeToolchain generated: conan_toolchain.cmake
fmt/10.2.1: CMakeToolchain generated: /home/user/.conan2/p/b/fmtb084e263f2086/b/build/Release/generators/CMakePresets.json
fmt/10.2.1: CMakeToolchain generated: /home/user/.conan2/p/b/fmtb084e263f2086/b/src/CMakeUserPresets.json
fmt/10.2.1: Generating aggregated env files
fmt/10.2.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
fmt/10.2.1: Calling build()
fmt/10.2.1: apply_conandata_patches(): No patches defined in conandata
fmt/10.2.1: Running CMake.configure()
fmt/10.2.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/user/.conan2/p/b/fmtb084e263f2086/p" -DFMT_DOC="OFF" -DFMT_TEST="OFF" -DFMT_INSTALL="ON" -DFMT_LIB_DIR="lib" -DFMT_OS="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/user/.conan2/p/b/fmtb084e263f2086/b/src"
-- CMake version: 3.22.1
-- Using Conan toolchain: /home/user/.conan2/p/b/fmtb084e263f2086/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is QCC 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/user/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 10.2.1
-- Build type: Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/.conan2/p/b/fmtb084e263f2086/b/build/Release
fmt/10.2.1: Running CMake.build()
fmt/10.2.1: RUN: cmake --build "/home/user/.conan2/p/b/fmtb084e263f2086/b/build/Release" -- -j12
[ 33%] Building CXX object CMakeFiles/fmt.dir/src/format.cc.o
[ 66%] Building CXX object CMakeFiles/fmt.dir/src/os.cc.o
In file included from /home/user/qnx710/target/qnx7/usr/include/c++/v1/__mutex_base:17,
from /home/user/qnx710/target/qnx7/usr/include/c++/v1/mutex:191,
from /home/user/qnx710/target/qnx7/usr/include/c++/v1/__locale:18,
from /home/user/qnx710/target/qnx7/usr/include/c++/v1/locale:182,
from /home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/format-inl.h:18,
from /home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/format.cc:8:
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support: In function 'int std::__1::__libcpp_recursive_mutex_init(std::__1::__libcpp_recursive_mutex_t*)':
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:43: error: 'PTHREAD_MUTEX_RECURSIVE' was not declared in this scope
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:43: note: suggested alternative: 'PTHREAD_MUTEX_ROBUST'
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~
PTHREAD_MUTEX_ROBUST
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:10: error: 'pthread_mutexattr_settype' was not declared in this scope
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:10: note: suggested alternative: 'pthread_mutexattr_destroy'
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~~~
pthread_mutexattr_destroy
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support: In function 'int std::__1::__libcpp_condvar_timedwait(std::__1::__libcpp_condvar_t*, std::__1::__libcpp_mutex_t*, timespec*)':
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:293:10: error: 'pthread_cond_timedwait' was not declared in this scope
return pthread_cond_timedwait(__cv, __m, __ts);
^~~~~~~~~~~~~~~~~~~~~~
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:293:10: note: suggested alternative: 'pthread_cond_wait'
return pthread_cond_timedwait(__cv, __m, __ts);
^~~~~~~~~~~~~~~~~~~~~~
pthread_cond_wait
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support: In function 'void std::__1::__libcpp_thread_sleep_for(const nanoseconds&)':
/home/user/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:375:11: error: 'nanosleep' was not declared in this scope
while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
^~~~~~~~~
In file included from /home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:13:
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In constructor 'fmt::v10::file::file(fmt::v10::cstring_view, int)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:212:33: error: '::open' has not been declared
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:212:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:212:18: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:212:33: note: suggested alternative: 'fopen'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:212:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:212:18: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In destructor 'fmt::v10::file::~file()':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:222:35: error: '::close' has not been declared
if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0)
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:222:35: note: suggested alternative: 'fclose'
if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0)
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In member function 'void fmt::v10::file::close()':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:230:31: error: '::close' has not been declared
int result = FMT_POSIX_CALL(close(fd_));
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:230:31: note: suggested alternative: 'fclose'
int result = FMT_POSIX_CALL(close(fd_));
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In member function 'long long int fmt::v10::file::size() const':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:254:22: error: '::fstat' has not been declared
if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1)
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:254:22: note: suggested alternative: 'stat'
if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1)
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In member function 'size_t fmt::v10::file::read(void*, size_t)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:264:36: error: '::read' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:264:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:264:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:264:36: note: suggested alternative: 'fread'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:264:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:264:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In member function 'size_t fmt::v10::file::write(const void*, size_t)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:272:36: error: '::write' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:272:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:272:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:272:36: note: suggested alternative: 'fwrite'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:272:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:272:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In static member function 'static fmt::v10::file fmt::v10::file::dup(int)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:281:31: error: '::dup' has not been declared
int new_fd = FMT_POSIX_CALL(dup(fd));
^~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In member function 'void fmt::v10::file::dup2(int)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:290:36: error: '::dup2' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:290:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:290:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:290:36: note: suggested alternative: 'exp2'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:290:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:290:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In member function 'void fmt::v10::file::dup2(int, std::__1::error_code&)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:300:36: error: '::dup2' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:300:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:300:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:300:36: note: suggested alternative: 'exp2'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:300:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:300:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In static member function 'static void fmt::v10::file::pipe(fmt::v10::file&, fmt::v10::file&)':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:317:31: error: '::pipe' has not been declared
int result = FMT_POSIX_CALL(pipe(fds));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:317:31: note: suggested alternative: 'file'
int result = FMT_POSIX_CALL(pipe(fds));
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc: In function 'long int fmt::v10::getpagesize()':
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:365:30: error: '::sysconf' has not been declared
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
^~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:365:30: note: suggested alternative: 'swscanf'
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
^~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/src/os.cc:365:38: error: '_SC_PAGESIZE' was not declared in this scope
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
^~~~~~~~~~~~
/home/user/.conan2/p/b/fmtb084e263f2086/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
gmake[2]: *** [CMakeFiles/fmt.dir/build.make:90: CMakeFiles/fmt.dir/src/os.cc.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/fmt.dir/build.make:76: CMakeFiles/fmt.dir/src/format.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/fmt.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
from conan.
conan install .. --build missing --profile:build=default --profile:host=aarch64
conan new cmake_lib -d name=qnxrestinio -d version=0.7.2 -d requires="restinio/[*]"
conan build . -s compiler.cppstd=17 --build missing
It seems you are mixing 2 different things here. The first conan install ..
is completely independent of the other 2 commands. With the conan new
+ conan build
I am trying to provide a fully reproducible and testable example, independent of your code, to illustrate that things work, and that most of those things in your CMakeLists.txt
are not necessary.
So lets work with only:
conan new cmake_lib -d name=qnxrestinio -d version=0.7.2 -d requires="restinio/[*]"
conan build . -s compiler.cppstd=17 --build missing
Lets have it building first for the native Linux system, for example. Then, we can try to add the qnx profile and see what happens:
conan build . --profile:host=aarch64 --build missing
Still, this second conan build
is working with the code generated by cmake_lib
, not your other code.
Otherwise, the other possible way to proceed would be:
- Put a minimal reproducible example in a git repo.
- that example should only contain the minimal dependencies to reproduce, in this case
restinio
, but remove other unrelated dependencies - Add build steps for a normal Linux systems, report the exact command and the build output.
- If the previous step works and finish succesfully, then proceed to do the same with the qnx profile.
The goal of this process is "divide and conquer", try to eliminate possible causes, until the reason of not finding the headers can be understood.
from conan.
So you mean, I dont need to use conan install now,
my command sequence at the terminal is
$ conan new cmake_lib -d name=qnxrestinio -d version=0.7.2 -d requires="restinio/[*]"
$ conan build . --profile:host=default --build missing
default is the current OS profile (build environment Linux)
output of conan build
======== Input profiles ========
Profile host:
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
but at the end I got
-- Using Conan toolchain: /home/user/QNX-restinio-app/build/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is QCC 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/user/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/QNX-restinio-app/build/build/Release
conanfile.py (qnxrestinio/0.7.2): Running CMake.build()
conanfile.py (qnxrestinio/0.7.2): RUN: cmake --build "/home/user/QNX-restinio-app/build/build/Release" -- -j12
[ 50%] Building CXX object CMakeFiles/qnxrestinio.dir/src/qnxrestinio.cpp.o
/home/user/QNX-restinio-app/build/src/qnxrestinio.cpp:3:10: fatal error: restinio.h: No such file or directory
#include "restinio.h"
^~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/qnxrestinio.dir/build.make:76: CMakeFiles/qnxrestinio.dir/src/qnxrestinio.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/qnxrestinio.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: conanfile.py (qnxrestinio/0.7.2): Error in build() method, line 48
cmake.build()
ConanException: Error 2 while executing
from conan.
Yes, the restinio.h
doesn't exist. Sorry my instructions were not complete, the complete isntructions were in my comment above and are:
$ conan new cmake_lib -d name=mypkg -d version=0.1 -d requires="restinio/[*]"
# add ``#include "restinio/core.hpp"`` in the src/mypkg.cpp source file
$ conan build . -s compiler.cppstd=17 # My default is 14, it might not be necessary in your case
default is the current OS profile (build environment Linux)
There is something that I might be missing? Is that as special Linux box? How was that profile defined? Conan doesn't define that default profile, because it doesn't have the qcc
compiler detection in the default profile detection. So I guess that such a profile was defined by other means.
I am trying to use first a more native, standard compiler as gcc
, to first sort out possible set-up issues. And then when it works, move to qcc
, because the qcc
setup could have different challenges, for example, some ConanCenter dependencies might not work or fail to build with qcc
, but that is a different issue. So we need to isolate problems, start with gcc
first, then move to qcc
later.
from conan.
I already tested restinio package with gcc compiler for host and target as linux, and that is working absolutely fine.
I use conan profile detect
command to create default profile, and for target profile I just created a text file inside conan profile folder.
Now, I deleted all profile txt files and recreated a default profile using the command connan profile detect
. I only have one default profile which I edited acoordingly, after that I again executed the commands sequence as below.
$ conan new cmake_lib -d name=qnxrestinio -d version=0.7.2 -d requires="restinio/[*]"
File saved: CMakeLists.txt
File saved: conanfile.py
File saved: include/qnxrestinio.h
File saved: src/qnxrestinio.cpp
File saved: test_package/CMakeLists.txt
File saved: test_package/conanfile.py
File saved: test_package/src/example.cpp
and include #include "restinio/core.hpp"
in build/src/qnxrestinio.app file and executed the below command
conan build . -s compiler.cppstd=17
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
======== Computing dependency graph ========
Graph root
conanfile.py (qnxrestinio/0.7.2): /home/user/QNX-restinio-app/build/conanfile.py
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
Resolved version ranges
restinio/[*]: restinio/0.7.2
======== Computing necessary packages ========
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d60b6954d6918b1b80923bbd011236e7ad7613d2 - Missing
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:250c2e0b2d2f64dc22a93898fd824a6811ea523a#14d879427f9d87bf3d3750e26cc8b32f - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
ERROR: Missing binary: fmt/10.2.1:d60b6954d6918b1b80923bbd011236e7ad7613d2
fmt/10.2.1: WARN: Can't find a 'fmt/10.2.1' package binary 'd60b6954d6918b1b80923bbd011236e7ad7613d2' for the configuration:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=4.4
os=Linux
[options]
fPIC=True
header_only=False
shared=False
with_os_api=True
ERROR: Missing prebuilt package for 'fmt/10.2.1'. You can try:
- List all available packages using 'conan list "fmt/10.2.1:*" -r=remote'
- Explain missing binaries: replace 'conan install ...' with 'conan graph explain ...'
- Try to build locally from sources using the '--build=fmt/10.2.1' argument
More Info at 'https://docs.conan.io/2/knowledge/faq.html#error-missing-prebuilt-package'
from conan.
If you reached out that point, then the error:
ERROR: Missing prebuilt package for 'fmt/10.2.1'. You can try:
- List all available packages using 'conan list "fmt/10.2.1:*" -r=remote'
- Explain missing binaries: replace 'conan install ...' with 'conan graph explain ...'
- Try to build locally from sources using the '--build=fmt/10.2.1' argument
Means that you don't have a binary built for fmt
for those settings. I am not fully sure how you got the rest, I guess they were built in some of your previous commands?
The error message is suggesting to do --build=xxx
or you can also do --build=missing
to fire the build of fmt
from source for your current profile, please try that and let us know.
from conan.
No, until now I am not able to build fmt/10.2.1
I think here comes the problem that I am not able to build fmt for QNX.
I also tried with $ conan build . -s compiler.cppstd=17 --build missing
and $ conan build . -s compiler.cppstd=17 --build=fmt/10.2.1
and is generating list of errors
error: 'PTHREAD_MUTEX_RECURSIVE' was not declared in this scope
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
which I mentioned is my previous comments..
from conan.
Ok, understood, it seems that we are doing some progress. The initial report was about
/path/main.cpp:5:10: fatal error: restinio/core.hpp: No such file or directory
#include <restinio/core.hpp>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
It is possible that fmt
doesn't build with that qcc
version 4.4
? fmt
is using pretty modern C++, so maybe if qcc
is not very compliant to that latest C++ standard, it might not work. Do you know if that version of fmt can be used with qcc 4.4
compiler?
Recipes in ConanCenter has common validate()
rules for the mainstream compilers, if you try to use an older gcc
for example, the recipe might raise an error telling that a more modern compiler would be needed. But they won't include validation for other compilers.
Likewise, Conan 2 strongly recommends the definition of compiler.cppstd
in your profile, with your desired C++ standard. This will help recipes to diagnose and raise errors if that provided standard is not enough to use that recipe.
The compiler.cppstd
is also automatically added by the conan profile detect
, have you removed it for some specific reason? I'd recommend to add it and try again, please try that and let me know. Thanks!
from conan.
Yes atleast now it is not complaining about restinio.h
I also noticed that the profile is showing qcc version 4.4
while compiling fmt, and I dont understand how can I change this.
on the other hand in conan profile I provided the qcc version 8.3
.
now I also have added the compiler.cppstd=gnu14 in profile but still same error.
from conan.
All your profiles output above are displaying:
compiler.version=4.4
So it doesn't seem to be reading that profile you say that defines 8.3
version.
By the way, in order to even reduce the reproduction to that last failure, I think it should be reproducible with:
conan install --requires=fmt/10.2.1 --build=missing -pr=myqnxprofile
That should be good enough to trigger the same error. Can you please share the output of that command with the updated gnu14 and qcc 8.3?
from conan.
$ conan install --requires=fmt/10.2.1 --build=missing -pr=default
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=gnu14
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=gnu14
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
======== Computing dependency graph ========
Graph root
cli
Requirements
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
======== Computing necessary packages ========
Requirements
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d3e6ad3ac583744cb16739a18ab97116750447d6#adf5bfb586ecf4ce36f9990d695a01ad - Cache
======== Installing packages ========
fmt/10.2.1: Already installed! (1 of 1)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.names' used in: fmt/10.2.1
======== Finalizing install (deploy, generators) ========
cli: Generating aggregated env files
cli: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
from conan.
$ conan new cmake_lib -d name=mypkg -d version=0.1 -d requires="restinio/[*]"
File saved: CMakeLists.txt
File saved: conanfile.py
File saved: include/mypkg.h
File saved: src/mypkg.cpp
File saved: test_package/CMakeLists.txt
File saved: test_package/conanfile.py
File saved: test_package/src/example.cpp
add #include "restinio/core.hpp"
in the src/mypkg.cpp source file
$conan build . -s compiler.cppstd=17
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=gnu14
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
======== Computing dependency graph ========
Graph root
conanfile.py (mypkg/0.1): /home/path/path/path/QNX-restinio-app/build/conanfile.py
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
Resolved version ranges
restinio/[*]: restinio/0.7.2
======== Computing necessary packages ========
fmt/10.2.1: Compatible package ID b36a7e2691b5c4630ca709f55224a3f3c7daf56e equal to the default package ID: Skipping it.
fmt/10.2.1: Checking 5 compatible configurations
fmt/10.2.1: Main binary package 'b36a7e2691b5c4630ca709f55224a3f3c7daf56e' missing. Using compatible package 'd3e6ad3ac583744cb16739a18ab97116750447d6': compiler.cppstd=gnu14
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d3e6ad3ac583744cb16739a18ab97116750447d6#adf5bfb586ecf4ce36f9990d695a01ad - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:4e96129059babba9f732a207a9e6f491c821d9e4#d658fd48fd2e8637b63f550ff52a1a15 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Already installed! (3 of 5)
llhttp/9.1.3: Already installed! (4 of 5)
restinio/0.7.2: Already installed! (5 of 5)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.filenames' used in: expected-lite/0.6.3
WARN: deprecated: 'cpp_info.names' used in: fmt/10.2.1, expected-lite/0.6.3
======== Finalizing install (deploy, generators) ========
conanfile.py (mypkg/0.1): Calling generate()
conanfile.py (mypkg/0.1): Generators folder: /home/path/path/path/QNX-restinio-app/build/build/Release/generators
conanfile.py (mypkg/0.1): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
find_package(restinio)
target_link_libraries(... restinio::restinio)
conanfile.py (mypkg/0.1): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (mypkg/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
(cmake>=3.23) cmake --preset conan-release
(cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.py (mypkg/0.1): CMakeToolchain generated: /home/path/path/path/QNX-restinio-app/build/build/Release/generators/CMakePresets.json
conanfile.py (mypkg/0.1): CMakeToolchain generated: /home/path/path/path/QNX-restinio-app/build/CMakeUserPresets.json
conanfile.py (mypkg/0.1): Generating aggregated env files
conanfile.py (mypkg/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
======== Calling build() ========
conanfile.py (mypkg/0.1): Calling build()
conanfile.py (mypkg/0.1): Running CMake.configure()
conanfile.py (mypkg/0.1): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/path/path/path/QNX-restinio-app/build" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/path/path/path/QNX-restinio-app/build"
-- Using Conan toolchain: /home/path/path/path/QNX-restinio-app/build/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is QCC 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/path/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_TOOLCHAIN_FILE
-- Build files have been written to: /home/path/path/path/QNX-restinio-app/build/build/Release
conanfile.py (mypkg/0.1): Running CMake.build()
conanfile.py (mypkg/0.1): RUN: cmake --build "/home/path/path/path/QNX-restinio-app/build/build/Release" -- -j12
[ 50%] Building CXX object CMakeFiles/mypkg.dir/src/mypkg.cpp.o
/home/path/path/path/QNX-restinio-app/build/src/mypkg.cpp:3:10: fatal error: restinio.h: No such file or directory
#include "restinio.h"
^~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/mypkg.dir/build.make:76: CMakeFiles/mypkg.dir/src/mypkg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/mypkg.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: conanfile.py (mypkg/0.1): Error in build() method, line 48
cmake.build()
ConanException: Error 2 while executing
from conan.
conan install --requires=fmt/10.2.1 --build=missing -pr=default
Sorry, this is not making any sense. It seems that you have a pre-compiled binary for this package, for qcc
. But ConanCenter doesn't have this binary for sure, so it means that you have built this binary yourself before, without issues?
Please try to remove your package first conan remove fmt* -c
and try again, and provide again the full log, or try to force the build with --build="fmt/*"
instead of the build=missing.
#include "restinio.h"
Sure it fails, the restinio.h
doesn't exist. You need to replace it by the restinio/core.hpp
above, please see the above comments.
from conan.
I am trying to start a new example code by having an empty folder, with your guidelines..
step:1 Create new project
$ conan new cmake_lib -d name=mypkg -d version=0.1 -d requires="restinio/[*]"
File saved: CMakeLists.txt
File saved: conanfile.py
File saved: include/mypkg.h
File saved: src/mypkg.cpp
File saved: test_package/CMakeLists.txt
File saved: test_package/conanfile.py
File saved: test_package/src/example.cpp
step:2 Removing old/cached fmt
$ conan remove fmt* -c
Found 0 pkg/version recipes matching fmt* in local cache
Remove summary:
Local Cache
step:3 replace restinio.h with restinio/core.hpp in src/mypkg.cpp file
#include <iostream>
#include "mypkg.h"
#include "restinio/core.hpp"
step:4 current CMakelist.txt file
cmake_minimum_required(VERSION 3.15)
project(mypkg CXX)
find_package(restinio CONFIG REQUIRED)
add_library(mypkg src/mypkg.cpp)
target_include_directories(mypkg PUBLIC include)
target_link_libraries(mypkg PRIVATE restinio::restinio)
set_target_properties(mypkg PROPERTIES PUBLIC_HEADER "include/mypkg.h")
install(TARGETS mypkg)
step:5 Execute conan build command at project root
$ conan build . -s compiler.cppstd=17 --build="fmt/*"
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=gnu14
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
======== Computing dependency graph ========
fmt/10.2.1: Not found in local cache, looking in remotes...
fmt/10.2.1: Checking remote: conancenter
fmt/10.2.1: Downloaded recipe revision 9199a7a0611866dea5c8849a77467b25
Graph root
conanfile.py (mypkg/0.1): /home/path/path/conan-example/conanfile.py
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Downloaded (conancenter)
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
Resolved version ranges
restinio/[*]: restinio/0.7.2
======== Computing necessary packages ========
fmt/10.2.1: Forced build from source
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:b36a7e2691b5c4630ca709f55224a3f3c7daf56e - Build
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:4e96129059babba9f732a207a9e6f491c821d9e4#d658fd48fd2e8637b63f550ff52a1a15 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Sources downloaded from 'conancenter'
fmt/10.2.1: Calling source() in /home/path/.conan2/p/fmt05805469774f3/s/src
fmt/10.2.1: Unzipping 4.6MB, this can take a while
Unzipping 100 %
-------- Installing package fmt/10.2.1 (3 of 5) --------
fmt/10.2.1: Building from source
fmt/10.2.1: Package fmt/10.2.1:b36a7e2691b5c4630ca709f55224a3f3c7daf56e
fmt/10.2.1: Copying sources to build folder
fmt/10.2.1: Building your package in /home/path/.conan2/p/b/fmt575a20aefbc4e/b
fmt/10.2.1: Calling generate()
fmt/10.2.1: Generators folder: /home/path/.conan2/p/b/fmt575a20aefbc4e/b/build/Release/generators
fmt/10.2.1: CMakeToolchain generated: conan_toolchain.cmake
fmt/10.2.1: CMakeToolchain generated: /home/path/.conan2/p/b/fmt575a20aefbc4e/b/build/Release/generators/CMakePresets.json
fmt/10.2.1: CMakeToolchain generated: /home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/CMakeUserPresets.json
fmt/10.2.1: Generating aggregated env files
fmt/10.2.1: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
fmt/10.2.1: Calling build()
fmt/10.2.1: apply_conandata_patches(): No patches defined in conandata
fmt/10.2.1: Running CMake.configure()
fmt/10.2.1: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/path/.conan2/p/b/fmt575a20aefbc4e/p" -DFMT_DOC="OFF" -DFMT_TEST="OFF" -DFMT_INSTALL="ON" -DFMT_LIB_DIR="lib" -DFMT_OS="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src"
-- CMake version: 3.22.1
-- Using Conan toolchain: /home/path/.conan2/p/b/fmt575a20aefbc4e/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The CXX compiler identification is QCC 8.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/path/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 10.2.1
-- Build type: Release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/path/.conan2/p/b/fmt575a20aefbc4e/b/build/Release
fmt/10.2.1: Running CMake.build()
fmt/10.2.1: RUN: cmake --build "/home/path/.conan2/p/b/fmt575a20aefbc4e/b/build/Release" -- -j12
[ 66%] Building CXX object CMakeFiles/fmt.dir/src/os.cc.o
[ 66%] Building CXX object CMakeFiles/fmt.dir/src/format.cc.o
In file included from /home/path/qnx710/target/qnx7/usr/include/c++/v1/__mutex_base:17,
from /home/path/qnx710/target/qnx7/usr/include/c++/v1/mutex:191,
from /home/path/qnx710/target/qnx7/usr/include/c++/v1/__locale:18,
from /home/path/qnx710/target/qnx7/usr/include/c++/v1/locale:182,
from /home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/format-inl.h:18,
from /home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/format.cc:8:
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support: In function 'int std::__1::__libcpp_recursive_mutex_init(std::__1::__libcpp_recursive_mutex_t*)':
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:43: error: 'PTHREAD_MUTEX_RECURSIVE' was not declared in this scope
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:43: note: suggested alternative: 'PTHREAD_MUTEX_ROBUST'
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~
PTHREAD_MUTEX_ROBUST
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:10: error: 'pthread_mutexattr_settype' was not declared in this scope
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:216:10: note: suggested alternative: 'pthread_mutexattr_destroy'
__ec = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
^~~~~~~~~~~~~~~~~~~~~~~~~
pthread_mutexattr_destroy
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support: In function 'int std::__1::__libcpp_condvar_timedwait(std::__1::__libcpp_condvar_t*, std::__1::__libcpp_mutex_t*, timespec*)':
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:293:10: error: 'pthread_cond_timedwait' was not declared in this scope
return pthread_cond_timedwait(__cv, __m, __ts);
^~~~~~~~~~~~~~~~~~~~~~
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:293:10: note: suggested alternative: 'pthread_cond_wait'
return pthread_cond_timedwait(__cv, __m, __ts);
^~~~~~~~~~~~~~~~~~~~~~
pthread_cond_wait
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support: In function 'void std::__1::__libcpp_thread_sleep_for(const nanoseconds&)':
/home/path/qnx710/target/qnx7/usr/include/c++/v1/__threading_support:375:11: error: 'nanosleep' was not declared in this scope
while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
^~~~~~~~~
In file included from /home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:13:
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In constructor 'fmt::v10::file::file(fmt::v10::cstring_view, int)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:212:33: error: '::open' has not been declared
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:212:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:212:18: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:212:33: note: suggested alternative: 'fopen'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:212:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:212:18: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(fd_, FMT_POSIX_CALL(open(path.c_str(), oflag, default_open_mode)));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In destructor 'fmt::v10::file::~file()':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:222:35: error: '::close' has not been declared
if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0)
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:222:35: note: suggested alternative: 'fclose'
if (fd_ != -1 && FMT_POSIX_CALL(close(fd_)) != 0)
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In member function 'void fmt::v10::file::close()':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:230:31: error: '::close' has not been declared
int result = FMT_POSIX_CALL(close(fd_));
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:230:31: note: suggested alternative: 'fclose'
int result = FMT_POSIX_CALL(close(fd_));
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In member function 'long long int fmt::v10::file::size() const':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:254:22: error: '::fstat' has not been declared
if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1)
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:254:22: note: suggested alternative: 'stat'
if (FMT_POSIX_CALL(fstat(fd_, &file_stat)) == -1)
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In member function 'size_t fmt::v10::file::read(void*, size_t)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:264:36: error: '::read' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:264:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:264:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:264:36: note: suggested alternative: 'fread'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:264:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:264:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(read(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In member function 'size_t fmt::v10::file::write(const void*, size_t)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:272:36: error: '::write' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:272:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:272:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:272:36: note: suggested alternative: 'fwrite'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:272:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:272:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(write(fd_, buffer, convert_rwcount(count))));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In static member function 'static fmt::v10::file fmt::v10::file::dup(int)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:281:31: error: '::dup' has not been declared
int new_fd = FMT_POSIX_CALL(dup(fd));
^~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In member function 'void fmt::v10::file::dup2(int)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:290:36: error: '::dup2' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:290:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:290:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:290:36: note: suggested alternative: 'exp2'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:290:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:290:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In member function 'void fmt::v10::file::dup2(int, std::__1::error_code&)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:300:36: error: '::dup2' has not been declared
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:300:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:300:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:300:36: note: suggested alternative: 'exp2'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:68:19: note: in definition of macro 'FMT_RETRY_VAL'
(result) = (expression); \
^~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:300:3: note: in expansion of macro 'FMT_RETRY'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:300:21: note: in expansion of macro 'FMT_POSIX_CALL'
FMT_RETRY(result, FMT_POSIX_CALL(dup2(fd_, fd)));
^~~~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In static member function 'static void fmt::v10::file::pipe(fmt::v10::file&, fmt::v10::file&)':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:317:31: error: '::pipe' has not been declared
int result = FMT_POSIX_CALL(pipe(fds));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:317:31: note: suggested alternative: 'file'
int result = FMT_POSIX_CALL(pipe(fds));
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc: In function 'long int fmt::v10::getpagesize()':
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:365:30: error: '::sysconf' has not been declared
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
^~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:365:30: note: suggested alternative: 'swscanf'
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
^~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/src/os.cc:365:38: error: '_SC_PAGESIZE' was not declared in this scope
long size = FMT_POSIX_CALL(sysconf(_SC_PAGESIZE));
^~~~~~~~~~~~
/home/path/.conan2/p/b/fmt575a20aefbc4e/b/src/include/fmt/os.h:59:36: note: in definition of macro 'FMT_POSIX_CALL'
# define FMT_POSIX_CALL(call) ::call
^~~~
gmake[2]: *** [CMakeFiles/fmt.dir/build.make:90: CMakeFiles/fmt.dir/src/os.cc.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/fmt.dir/build.make:76: CMakeFiles/fmt.dir/src/format.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/fmt.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
fmt/10.2.1: ERROR:
Package 'b36a7e2691b5c4630ca709f55224a3f3c7daf56e' build failed
fmt/10.2.1: WARN: Build folder /home/path/.conan2/p/b/fmt575a20aefbc4e/b/build/Release
ERROR: fmt/10.2.1: Error in build() method, line 95
cmake.build()
ConanException: Error 2 while executing
from conan.
Hi @memsharded, Could you please check my last steps and the outcome thanks :)
from conan.
So as an update, I have change the build command with conan build . --build=missing -pr:h=aarch64
by removing -s compiler.cppstd=17
flag and now I am getting some other errors, rather than PTHREAD_MUTEX_RECURSIVE
and now the list of errors are
conan build . --build=missing -pr:h=aarch64
======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=qcc
compiler.cppstd=gnu17
compiler.libcxx=cxx
compiler.version=8.3
os=Neutrino
os.version=7.1
[runenv]
CC=qcc
CXX=QCC
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=gnu17
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
[runenv]
CC=qcc
CXX=QCC
======== Computing dependency graph ========
Graph root
conanfile.py (mypkg/0.1): /home/path/path/Conan-restinio/conan-example/conanfile.py
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
Resolved version ranges
restinio/[*]: restinio/0.7.2
======== Computing necessary packages ========
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d3656b3610b5fb306bb85fd591779dff7722d312#bb59c5e3580cf94510726d811830f580 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:1206343ed397d681a20ab89a11a6d1294c9aa63e#9c4fec3a91061535748edbe79f00857b - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Already installed! (3 of 5)
llhttp/9.1.3: Already installed! (4 of 5)
restinio/0.7.2: Already installed! (5 of 5)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.filenames' used in: expected-lite/0.6.3
WARN: deprecated: 'cpp_info.names' used in: fmt/10.2.1, expected-lite/0.6.3
======== Finalizing install (deploy, generators) ========
conanfile.py (mypkg/0.1): Calling generate()
conanfile.py (mypkg/0.1): Generators folder: /home/path/path/Conan-restinio/conan-example/build/Release/generators
conanfile.py (mypkg/0.1): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
find_package(restinio)
target_link_libraries(... restinio::restinio)
conanfile.py (mypkg/0.1): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (mypkg/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
(cmake>=3.23) cmake --preset conan-release
(cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.py (mypkg/0.1): CMakeToolchain generated: /home/path/path/Conan-restinio/conan-example/build/Release/generators/CMakePresets.json
conanfile.py (mypkg/0.1): CMakeToolchain generated: /home/path/path/Conan-restinio/conan-example/CMakeUserPresets.json
conanfile.py (mypkg/0.1): Generating aggregated env files
conanfile.py (mypkg/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
======== Calling build() ========
conanfile.py (mypkg/0.1): Calling build()
conanfile.py (mypkg/0.1): Running CMake.configure()
conanfile.py (mypkg/0.1): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/path/path/Conan-restinio/conan-example" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/path/path/Conan-restinio/conan-example"
-- Using Conan toolchain: /home/path/path/Conan-restinio/conan-example/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/path/path/Conan-restinio/conan-example/build/Release
conanfile.py (mypkg/0.1): Running CMake.build()
conanfile.py (mypkg/0.1): RUN: cmake --build "/home/path/path/Conan-restinio/conan-example/build/Release" -- -j12
Consolidate compiler generated dependencies of target mypkg
[ 50%] Building CXX object CMakeFiles/mypkg.dir/src/mypkg.cpp.o
In file included from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/serial_port_base.hpp:161,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/basic_serial_port.hpp:35,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio.hpp:38,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/asio_include.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:16,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/serial_port_base.ipp: In member function 'asio::error_code asio::serial_port_base::flow_control::store(termios&, asio::error_code&) const':
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/serial_port_base.ipp:255:26: error: 'IHFLOW' was not declared in this scope
storage.c_cflag &= ~(IHFLOW | OHFLOW);
^~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/serial_port_base.ipp:255:35: error: 'OHFLOW' was not declared in this scope
storage.c_cflag &= ~(IHFLOW | OHFLOW);
^~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/serial_port_base.ipp: In member function 'asio::error_code asio::serial_port_base::flow_control::load(const termios&, asio::error_code&)':
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/serial_port_base.ipp:314:30: error: 'IHFLOW' was not declared in this scope
else if (storage.c_cflag & IHFLOW && storage.c_cflag & OHFLOW)
^~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/serial_port_base.ipp:314:58: error: 'OHFLOW' was not declared in this scope
else if (storage.c_cflag & IHFLOW && storage.c_cflag & OHFLOW)
^~~~~~
In file included from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/impl/error_code.ipp:29,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/error_code.hpp:36,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/throw_error.hpp:20,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/impl/posix_tss_ptr.ipp:23,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/posix_tss_ptr.hpp:74,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/tss_ptr.hpp:27,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/call_stack.hpp:20,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/thread_context.hpp:20,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/recycling_allocator.hpp:20,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/handler_alloc_helpers.hpp:21,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/executor_function.hpp:19,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/execution/any_executor.hpp:24,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/execution.hpp:19,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/any_completion_executor.hpp:22,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio.hpp:18,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/asio_include.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:16,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/signal_set_base.hpp: At global scope:
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/signal_set_base.hpp:65:15: error: 'SA_RESTART' was not declared in this scope
restart = ASIO_OS_DEF(SA_RESTART),
^~~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/signal_set_base.hpp:65:15: note: suggested alternative: 'ERESTART'
In file included from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:26,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/ip/basic_resolver.hpp:37,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio.hpp:118,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/asio_include.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:16,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp: In static member function 'static void asio::detail::resolve_endpoint_op<Protocol, Handler, IoExecutor>::do_complete(void*, asio::detail::operation*, const error_code&, size_t)':
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:82:22: error: 'NI_MAXHOST' was not declared in this scope
char host_name[NI_MAXHOST] = "";
^~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:82:22: note: suggested alternative: 'SI_MAXSZ'
char host_name[NI_MAXHOST] = "";
^~~~~~~~~~
SI_MAXSZ
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:83:25: error: 'NI_MAXSERV' was not declared in this scope
char service_name[NI_MAXSERV] = "";
^~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:83:25: note: suggested alternative: 'SI_MAXSZ'
char service_name[NI_MAXSERV] = "";
^~~~~~~~~~
SI_MAXSZ
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:85:32: error: 'host_name' was not declared in this scope
o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:85:32: note: suggested alternative: 'hostent'
o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~
hostent
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:85:55: error: 'service_name' was not declared in this scope
o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolve_endpoint_op.hpp:85:55: note: suggested alternative: 'service_base'
o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~~~~
service_base
In file included from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/ip/basic_resolver.hpp:37,
from /home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio.hpp:118,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/asio_include.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:16,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp: In member function 'asio::detail::resolver_service<Protocol>::results_type asio::detail::resolver_service<Protocol>::resolve(asio::detail::resolver_service<Protocol>::implementation_type&, const endpoint_type&, asio::error_code&)':
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:110:20: error: 'NI_MAXHOST' was not declared in this scope
char host_name[NI_MAXHOST];
^~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:110:20: note: suggested alternative: 'SI_MAXSZ'
char host_name[NI_MAXHOST];
^~~~~~~~~~
SI_MAXSZ
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:111:23: error: 'NI_MAXSERV' was not declared in this scope
char service_name[NI_MAXSERV];
^~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:111:23: note: suggested alternative: 'SI_MAXSZ'
char service_name[NI_MAXSERV];
^~~~~~~~~~
SI_MAXSZ
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:113:9: error: 'host_name' was not declared in this scope
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:113:9: note: suggested alternative: 'hostent'
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~
hostent
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:113:32: error: 'service_name' was not declared in this scope
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~~~~
/home/path/.conan2/p/asioaf1eb798e94b4/p/include/asio/detail/resolver_service.hpp:113:32: note: suggested alternative: 'service_base'
host_name, NI_MAXHOST, service_name, NI_MAXSERV,
^~~~~~~~~~~~
service_base
In file included from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation.hpp:104,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/write_group_output_ctx.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/connection.hpp:26,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/acceptor.hpp:17,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/http_server.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:20,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation_posix.ipp: In member function 'auto restinio::impl::sendfile_operation_runner_t<asio::basic_stream_socket<asio::ip::tcp> >::call_native_sendfile()':
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation_posix.ipp:206:7: error: '::sendfile' has not been declared
::sendfile(
^~~~~~~~
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation_posix.ipp:206:7: note: suggested alternative:
In file included from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/message_builders.hpp:19,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/request_handler.hpp:15,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/settings.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:17,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/sendfile.hpp:538:1: note: 'restinio::sendfile'
sendfile(
^~~~~~~~
In file included from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation.hpp:104,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/write_group_output_ctx.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/connection.hpp:26,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/acceptor.hpp:17,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/http_server.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:20,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:11:
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation_posix.ipp:218:6: error: 'SF_MNOWAIT' was not declared in this scope
SF_MNOWAIT
^~~~~~~~~~
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation_posix.ipp:218:6: note: suggested alternative: 'WNOWAIT'
SF_MNOWAIT
^~~~~~~~~~
WNOWAIT
gmake[2]: *** [CMakeFiles/mypkg.dir/build.make:76: CMakeFiles/mypkg.dir/src/mypkg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/mypkg.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: conanfile.py (mypkg/0.1): Error in build() method, line 48
cmake.build()
ConanException: Error 2 while executing
and if I change the profile with -pr:b=default
I get the same errors.
secondly, could you please also consider the Warning as previously I was getting warning related to C**std but now it is changed.
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.filenames' used in: expected-lite/0.6.3
WARN: deprecated: 'cpp_info.names' used in: fmt/10.2.1, expected-lite/0.6.3
from conan.
Hi @memsharded, still waiting for your feedback..
from conan.
At this point I tend to think that qcc
8.3 doesn't have the necessary C++17 support to compile fmt
. Is this possible?
Can you please try to build and use fmt
without Conan with your compiler?
from conan.
By the way, I have been trying to find information about qcc 8.3, its standard support, any issues, etc, but the documentation and occurrences seem really scarce. It is also not listed in https://en.cppreference.com/w/cpp/compiler_support
Maybe you have some links or pointers to places to look up this information?
from conan.
@memsharded thanks for the identification of suspected cause, I will try to build fmt with qcc, meanwhile I will also try to get the information regarding qcc compiler support for c++17 standard and let you know..
by the way at the moment without adding the parameter compiler.cppstd=17
in the command I am getting the following error
conan build . --build=missing -pr:h=aarch64 -pr:b=default -s:h arch=armv8 -s:h os=Neutrino -s:b arch=x86_64
======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=qcc
compiler.cppstd=gnu17
compiler.libcxx=cxx
compiler.version=8.3
os=Neutrino
os.version=7.1
[runenv]
CC=qcc
CXX=QCC
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=gnu17
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
[runenv]
CC=qcc
CXX=QCC
======== Computing dependency graph ========
Graph root
conanfile.py (mypkg/0.1): /home/path/path/Conan-restinio/conan-example/conanfile.py
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
Resolved version ranges
restinio/[*]: restinio/0.7.2
======== Computing necessary packages ========
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d3656b3610b5fb306bb85fd591779dff7722d312#bb59c5e3580cf94510726d811830f580 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:1206343ed397d681a20ab89a11a6d1294c9aa63e#9c4fec3a91061535748edbe79f00857b - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Already installed! (3 of 5)
llhttp/9.1.3: Already installed! (4 of 5)
restinio/0.7.2: Already installed! (5 of 5)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.filenames' used in: expected-lite/0.6.3
WARN: deprecated: 'cpp_info.names' used in: fmt/10.2.1, expected-lite/0.6.3
======== Finalizing install (deploy, generators) ========
conanfile.py (mypkg/0.1): Calling generate()
conanfile.py (mypkg/0.1): Generators folder: /home/path/path/Conan-restinio/conan-example/build/Release/generators
conanfile.py (mypkg/0.1): CMakeDeps necessary find_package() and targets for your CMakeLists.txt
find_package(restinio)
target_link_libraries(... restinio::restinio)
conanfile.py (mypkg/0.1): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (mypkg/0.1): CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
(cmake>=3.23) cmake --preset conan-release
(cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.py (mypkg/0.1): CMakeToolchain generated: /home/path/path/Conan-restinio/conan-example/build/Release/generators/CMakePresets.json
conanfile.py (mypkg/0.1): CMakeToolchain generated: /home/path/path/Conan-restinio/conan-example/CMakeUserPresets.json
conanfile.py (mypkg/0.1): Generating aggregated env files
conanfile.py (mypkg/0.1): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
======== Calling build() ========
conanfile.py (mypkg/0.1): Calling build()
conanfile.py (mypkg/0.1): Running CMake.configure()
conanfile.py (mypkg/0.1): RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/home/path/path/Conan-restinio/conan-example" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/home/path/path/Conan-restinio/conan-example"
-- Using Conan toolchain: /home/path/path/Conan-restinio/conan-example/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/path/path/Conan-restinio/conan-example/build/Release
conanfile.py (mypkg/0.1): Running CMake.build()
conanfile.py (mypkg/0.1): RUN: cmake --build "/home/path/path/Conan-restinio/conan-example/build/Release" -- -j12
Consolidate compiler generated dependencies of target mypkg
[ 50%] Building CXX object CMakeFiles/mypkg.dir/src/mypkg.cpp.o
In file included from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation.hpp:104,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/write_group_output_ctx.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/connection.hpp:26,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/acceptor.hpp:17,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/http_server.hpp:14,
from /home/path/.conan2/p/resti2478711f40029/p/include/restinio/core.hpp:20,
from /home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:16:
/home/path/.conan2/p/resti2478711f40029/p/include/restinio/impl/sendfile_operation_posix.ipp:12:11: fatal error: sys/sendfile.h: No such file or directory
#include <sys/sendfile.h>
^~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/mypkg.dir/build.make:76: CMakeFiles/mypkg.dir/src/mypkg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/mypkg.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
ERROR: conanfile.py (mypkg/0.1): Error in build() method, line 48
cmake.build()
ConanException: Error 2 while executing
from conan.
At this point I tend to think that qcc 8.3 doesn't have the necessary C++17 support to compile fmt. Is this possible?
looks like qcc supports c++17, have a look at this link
Can you please try to build and use fmt without Conan with your compiler?
I have tried fmt with qcc but getting some other errors not related to c++17.
make
[ 1%] Building CXX object CMakeFiles/fmt.dir/src/format.cc.o
[ 2%] Building CXX object CMakeFiles/fmt.dir/src/os.cc.o
[ 4%] Linking CXX static library libfmt.a
[ 4%] Built target fmt
[ 5%] Building CXX object test/gtest/CMakeFiles/gtest.dir/gmock-gtest-all.cc.o
[ 7%] Linking CXX static library libgtest.a
[ 7%] Built target gtest
[ 8%] Building CXX object test/CMakeFiles/test-main.dir/test-main.cc.o
[ 9%] Building CXX object test/CMakeFiles/test-main.dir/gtest-extra.cc.o
[ 11%] Building CXX object test/CMakeFiles/test-main.dir/util.cc.o
[ 12%] Linking CXX static library libtest-main.a
[ 12%] Built target test-main
[ 14%] Building CXX object test/CMakeFiles/args-test.dir/args-test.cc.o
[ 15%] Linking CXX executable ../bin/args-test
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: gtest/libgtest.a(gmock-gtest-all.cc.o): in function `testing::internal::RE::~RE()':
gmock-gtest-all.cc:(.text+0x51704): undefined reference to `regfree'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: gmock-gtest-all.cc:(.text+0x51714): undefined reference to `regfree'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: gtest/libgtest.a(gmock-gtest-all.cc.o): in function `testing::internal::RE::FullMatch(char const*, testing::internal::RE const&)':
gmock-gtest-all.cc:(.text+0x51782): undefined reference to `regexec'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: gtest/libgtest.a(gmock-gtest-all.cc.o): in function `testing::internal::RE::PartialMatch(char const*, testing::internal::RE const&)':
gmock-gtest-all.cc:(.text+0x517fa): undefined reference to `regexec'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: gtest/libgtest.a(gmock-gtest-all.cc.o): in function `testing::internal::RE::Init(char const*)':
gmock-gtest-all.cc:(.text+0x518da): undefined reference to `regcomp'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: gmock-gtest-all.cc:(.text+0x5193f): undefined reference to `regcomp'
test/CMakeFiles/args-test.dir/build.make:99: recipe for target 'bin/args-test' failed
make[2]: *** [bin/args-test] Error 1
CMakeFiles/Makefile2:211: recipe for target 'test/CMakeFiles/args-test.dir/all' failed
make[1]: *** [test/CMakeFiles/args-test.dir/all] Error 2
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
in my last comments, it looks like it has installed
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Already installed! (3 of 5)
llhttp/9.1.3: Already installed! (4 of 5)
restinio/0.7.2: Already installed! (5 of 5)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.filenames' used in: expected-lite/0.6.3
WARN: deprecated: 'cpp_info.names' used in: fmt/10.2.1, expected-lite/0.6.3
I am doubtful with these warnings also.
from conan.
From the above:
#include <sys/sendfile.h>
It seems we passed the error of building fmt
, with qcc
if I understood correctly, but it is a bit difficult to understand because dealing with a large application, not something minimal that we can reproduce.
It seems this is something not related to fmt anymore, but to the setup of the qcc
toolchain, and some information to locate "system" qcc
headers is missing somewhere. I don't have enough knowledge about qcc
.
Is it possible to download a free version of qcc
from somewhere to try things?
Then, if possible, the best would be really to put everything in a Github repo, with a build.py
script in its root with the exact reproduction steps so we can use that to check.
from conan.
Yes, I also think its not related to fmt
, rather to qcc
tool-chain.
I don't think that qcc
have free version is available.
what about the warnings that I have highlighted.
from conan.
Hi,
As per more investigation I have found that QNX does not supports SA_RESTART as also discussed here
in a meantime I just commented out the code that contains SA_RESTART fucntionality and now able to compile dependencies..
but when I tried to include addexecuteable in CMakelist.txt file to get output file I got header error again.
$conan build . --build missing -pr:b=default -pr:h=aarch64
======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=qcc
compiler.cppstd=gnu17
compiler.libcxx=cxx
compiler.version=8.3
os=Neutrino
os.version=7.1
[runenv]
CC=qcc
CXX=QCC
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
[runenv]
CC=qcc
CXX=QCC
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Already installed! (3 of 5)
llhttp/9.1.3: Already installed! (4 of 5)
restinio/0.7.2: Already installed! (5 of 5)
-- Using Conan toolchain: /home/path/path/Conan-restinio/conan-example/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/path/path/Conan-restinio/conan-example/build/Release
[ 50%] Building CXX object CMakeFiles/mypkg.dir/src/mypkg.cpp.o
[100%] Linking CXX static library libmypkg.a
[100%] Built target mypkg
$cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/path/path/Conan-restinio/conan-example/build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
-- Using Conan toolchain: /home/path/path/Conan-restinio/conan-example/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is QCC 8.3.0
-- The CXX compiler identification is QCC 8.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/path/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/path/qnx710/host/linux/x86_64/usr/bin/q++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/path/path/Conan-restinio/conan-example/build
$ cmake --build .
[ 50%] Building CXX object CMakeFiles/mypkg.dir/src/mypkg.cpp.o
[100%] Linking CXX static library libmypkg.a
[100%] Built target mypkg
Now I added add_executable(output src/mypkg.cpp)
in CMakeList.txt file, to generate the executeable
$cmake --build .
Consolidate compiler generated dependencies of target mypkg
[ 50%] Built target mypkg
[ 75%] Building CXX object CMakeFiles/output.dir/src/mypkg.cpp.o
/home/path/path/Conan-restinio/conan-example/src/mypkg.cpp:28:10: fatal error: restinio/core.hpp: No such file or directory
#include <restinio/core.hpp>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/output.dir/build.make:76: CMakeFiles/output.dir/src/mypkg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/output.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
from conan.
It would be necessary to see the full code. It seems that you are adding add_executable(output src/mypkg.cpp)
, but are you adding the target_link_libraries(output ... restinio::restinio ...)
? It is also not clear, how you are building a library, but also an executable from the same src/mypkg.cpp
?
from conan.
here is my CMakelist.txt file if it might help..
cmake_minimum_required(VERSION 3.17)
project(mypkg)
find_package(restinio CONFIG REQUIRED)
find_package(Threads)
add_library(mypkg src/mypkg.cpp)
target_include_directories(mypkg PUBLIC include)
target_link_libraries(mypkg PRIVATE restinio::restinio)
#RESTINIO_ENABLE_SENDFILE_DEFAULT_IMPL
#add_executable(output src/mypkg.cpp)
target_compile_definitions(mypkg PRIVATE RESTINIO_FREEBSD_TARGET)
set_target_properties(mypkg PROPERTIES PUBLIC_HEADER "include/mypkg.h")
install(TARGETS mypkg)
Similarly, pkg.cpp file lies in src/mypkg.cpp and the code is
#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <restinio/core.hpp>
using namespace std;
int main(){
restinio::run(
restinio::on_this_thread()
.port(8080)
.address("localhost")
.request_handler([](auto req) {
return req->create_response().set_body("Hello, World!").done();
}));
return 0;
}
Further, here is conan.py file
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
class mypkgRecipe(ConanFile):
name = "mypkg"
version = "0.1"
package_type = "library"
# Optional metadata
license = "<Put the package license here>"
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of mypkg package here>"
topics = ("<Put some tag here>", "<here>", "<and here>")
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
# Sources are located in the same place as this recipe, copy them to the recipe
exports_sources = "CMakeLists.txt", "src/*", "include/*"
def config_options(self):
if self.settings.os == "Windows":
self.options.rm_safe("fPIC")
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
def layout(self):
cmake_layout(self)
def requirements(self):
self.requires("restinio/[*]")
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.libs = ["mypkg"]
from conan.
This is what I was suggesting above. You have add_executable(output src/mypkg.cpp)
, but you are not specifying that it needs to link with restinio, it is missing something like target_link_libraries(output PRIVATE restinio::restinio)
Please note that having a library mypkg
that contains a main()
function is generally not a good idea, you don't want to put a main()
inside a library.
Also, in most cases something like target_compile_definitions(mypkg PRIVATE RESTINIO_FREEBSD_TARGET)
shouldn't be done in the mypkg
consumer, if there are some compile definitions that come from the package, they will also be part of the restinio::restinio
target. It is likely that RESTINIO_FREEBSD_TARGET is just empty, I cannot see where is it coming from.
from conan.
OK, it make sense.
I have changed it to generate Output file based on my current project rather than a library.
my new setting in CMakelist.txt file is
cmake_minimum_required(VERSION 3.17)
project(mypkg)
find_package(restinio REQUIRED)
add_executable(output src/mypkg.cpp)
target_link_libraries(output restinio::restinio)
This is the similar setting which I have with gcc project and that project creates an executable, once I execute that executable, I am able to send and receive response that means restinio working, but here after having same settings, it still says that, header file not found.
Conan-restinio/conan-example/src/mypkg.cpp:28:10: fatal error: restinio/core.hpp: No such file or directory
#include <restinio/core.hpp>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/output.dir/build.make:76: CMakeFiles/output.dir/src/mypkg.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/output.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
ERROR: conanfile.py (mypkg/0.1): Error in build() method, line 48
cmake.build()
ConanException: Error 2 while executing
from conan.
This is very complicated to know.
What is the full output of the conan install
command?
What is the full output of the cmake ...
command? (and the full command)
When conan install
runs, it generates locally different files inside the generators
folder, like restinio....data.cmake
, and that file will contain paths to the restinio
package, and the diffrent folders. Can you please share that file contents?
Then go the the folder defined in that file and check that the restinio/core.hpp
exists inside the include
folder?
I am trying to know if the restinio
package was correctly package for qcc/qnx
in the first place, it is possible that the recipe has some bugs ore issues and the package is not being correctly created. The full output logs that happen when the restinio
package is built from source would help, like if in the above conan install
command you add --build=restinio/*
to force the build from source, we will get those logs too.
from conan.
I think there is no issue with conan install
. the thing is I was mixing two things, I need to use a conan package using conan install
but with your initial instruction I was trying to create a conan package using $ conan new cmake_lib -d name=mypkg -d version=0.1 -d requires="restinio/[*]"
and then start compiling the project assuming that it will generate an executeable.
So, the current status is, I have created a cmake hellow-world project and then install conan restinio package which seems it has downloaded and installed correctly, and then I call the restinio/core.hpp file inside my main.cpp file, but as soon as I start compiling it generate qcc compiler based errors and looks like there is a compatibility issue for qcc with restinio or its dependencies.
below are the complete steps and the outcomes. I am also going to attached a sample code which I am using.
Step-1: Conan install
$conan install . --build missing -pr:b=default -pr:h=aarch64
======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=qcc
compiler.cppstd=gnu17
compiler.libcxx=cxx
compiler.version=8.3
os=Neutrino
os.version=7.1
[runenv]
CC=qcc
CXX=QCC
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=qcc
compiler.cppstd=17
compiler.libcxx=cxx
compiler.version=8.3
os=Linux
[runenv]
CC=qcc
CXX=QCC
======== Computing dependency graph ========
Graph root
conanfile.txt: /home/path/Conan-restinio/conanfile.txt
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8 - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604 - Cache
======== Computing necessary packages ========
restinio/0.7.2: WARN: restinio recipe lacks information about the qcc compiler standard version support
restinio/0.7.2: WARN: restinio requires a compiler that supports at least C++17
Requirements
asio/1.29.0#52d17a857aa6f978d8c17d7c38eae5ad:da39a3ee5e6b4b0d3255bfef95601890afd80709#b132a176c32962cb7be826d56fbe242d - Cache
expected-lite/0.6.3#8ab50f785d3105e9bfffe17524ec24b5:da39a3ee5e6b4b0d3255bfef95601890afd80709#beb7503b67488b722e231f67855dbbf6 - Cache
fmt/10.2.1#9199a7a0611866dea5c8849a77467b25:d3656b3610b5fb306bb85fd591779dff7722d312#bb59c5e3580cf94510726d811830f580 - Cache
llhttp/9.1.3#fb2ae83c4085db017151c6214a4f02f8:1206343ed397d681a20ab89a11a6d1294c9aa63e#9c4fec3a91061535748edbe79f00857b - Cache
restinio/0.7.2#66b6dbaabc87758cbb81f9958cdd5604:da39a3ee5e6b4b0d3255bfef95601890afd80709#2b39514bb950c7160e930fa19116183a - Cache
======== Installing packages ========
asio/1.29.0: Already installed! (1 of 5)
expected-lite/0.6.3: Already installed! (2 of 5)
fmt/10.2.1: Already installed! (3 of 5)
llhttp/9.1.3: Already installed! (4 of 5)
restinio/0.7.2: Already installed! (5 of 5)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.filenames' used in: expected-lite/0.6.3
WARN: deprecated: 'cpp_info.names' used in: expected-lite/0.6.3, fmt/10.2.1
======== Finalizing install (deploy, generators) ========
conanfile.txt: Writing generators to /home/path/Conan-restinio/build/Release/generators
conanfile.txt: Generator 'CMakeDeps' calling 'generate()'
conanfile.txt: CMakeDeps necessary find_package() and targets for your CMakeLists.txt
find_package(restinio)
target_link_libraries(... restinio::restinio)
conanfile.txt: Generator 'CMakeToolchain' calling 'generate()'
conanfile.txt: CMakeToolchain generated: conan_toolchain.cmake
conanfile.txt: CMakeToolchain: Preset 'conan-release' added to CMakePresets.json.
(cmake>=3.23) cmake --preset conan-release
(cmake<3.23) cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
conanfile.txt: CMakeToolchain generated: /home/path/Conan-restinio/build/Release/generators/CMakePresets.json
conanfile.txt: CMakeToolchain generated: /home/path/Conan-restinio/CMakeUserPresets.json
conanfile.txt: Generating aggregated env files
conanfile.txt: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
Step-2: Execute Cmake using conan toolchain inside from the build folder
cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/path/Conan-restinio/build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
-- Using Conan toolchain: /home/path/Conan-restinio/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 17 with extensions ON
-- The C compiler identification is QCC 8.3.0
-- The CXX compiler identification is QCC 8.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/path/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/path/qnx710/host/linux/x86_64/usr/bin/qcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Target declared 'restinio::restinio'
-- Conan: Target declared 'llhttp::llhttp'
-- Conan: Component target declared 'fmt::fmt'
-- Conan: Component target declared 'nonstd::expected-lite'
-- Conan: Target declared 'asio::asio'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/path/Conan-restinio/build
Step-3 Execute cmake build command
$ cmake --build .
[ 33%] Building CXX object CMakeFiles/output.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/output.dir/hello.cpp.o
[100%] Linking CXX executable output
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `asio::detail::reactive_socket_send_op_base<asio::detail::prepared_buffers<asio::const_buffer, 16ul> >::do_perform(asio::detail::reactor_op*)':
main.cpp:(.text._ZN4asio6detail28reactive_socket_send_op_baseINS0_16prepared_buffersINS_12const_bufferELm16EEEE10do_performEPNS0_10reactor_opE[_ZN4asio6detail28reactive_socket_send_op_baseINS0_16prepared_buffersINS_12const_bufferELm16EEEE10do_performEPNS0_10reactor_opE]+0x388): undefined reference to `sendmsg'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `asio::detail::reactive_socket_recv_op_base<asio::mutable_buffers_1>::do_perform(asio::detail::reactor_op*)':
main.cpp:(.text._ZN4asio6detail28reactive_socket_recv_op_baseINS_17mutable_buffers_1EE10do_performEPNS0_10reactor_opE[_ZN4asio6detail28reactive_socket_recv_op_baseINS_17mutable_buffers_1EE10do_performEPNS0_10reactor_opE]+0x34): undefined reference to `recv'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `asio::detail::socket_ops::close(int, unsigned char&, bool, std::__1::error_code&)':
main.cpp:(.text._ZN4asio6detail10socket_ops5closeEiRhbRNSt3__110error_codeE[_ZN4asio6detail10socket_ops5closeEiRhbRNSt3__110error_codeE]+0x140): undefined reference to `setsockopt'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `asio::detail::reactive_socket_accept_op_base<asio::basic_socket<asio::ip::tcp, asio::any_io_executor>, asio::ip::tcp>::do_perform(asio::detail::reactor_op*)':
main.cpp:(.text._ZN4asio6detail30reactive_socket_accept_op_baseINS_12basic_socketINS_2ip3tcpENS_15any_io_executorEEES4_E10do_performEPNS0_10reactor_opE[_ZN4asio6detail30reactive_socket_accept_op_baseINS_12basic_socketINS_2ip3tcpENS_15any_io_executorEEES4_E10do_performEPNS0_10reactor_opE]+0x59): undefined reference to `accept'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZN4asio6detail30reactive_socket_accept_op_baseINS_12basic_socketINS_2ip3tcpENS_15any_io_executorEEES4_E10do_performEPNS0_10reactor_opE[_ZN4asio6detail30reactive_socket_accept_op_baseINS_12basic_socketINS_2ip3tcpENS_15any_io_executorEEES4_E10do_performEPNS0_10reactor_opE]+0x183): undefined reference to `accept'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `void std::__1::__function::__policy_invoker<void (restinio::acceptor_options_t&)>::__call_impl<std::__1::__function::__alloc_func<restinio::create_default_unique_object_instance<std::__1::function<void (restinio::acceptor_options_t&)> >()::{lambda(restinio::acceptor_options_t&)#1}, std::__1::allocator<{lambda(restinio::acceptor_options_t&)#1}>, void (restinio::acceptor_options_t&)> >(std::__1::__function::__policy_storage const*, restinio::acceptor_options_t&)':
main.cpp:(.text._ZNSt3__110__function16__policy_invokerIFvRN8restinio18acceptor_options_tEEE11__call_implINS0_12__alloc_funcIZNS2_37create_default_unique_object_instanceINS_8functionIS5_EEEEDavEUlS4_E_NS_9allocatorISC_EES5_EEEEvPKNS0_16__policy_storageES4_[_ZNSt3__110__function16__policy_invokerIFvRN8restinio18acceptor_options_tEEE11__call_implINS0_12__alloc_funcIZNS2_37create_default_unique_object_instanceINS_8functionIS5_EEEEDavEUlS4_E_NS_9allocatorISC_EES5_EEEEvPKNS0_16__policy_storageES4_]+0x50): undefined reference to `setsockopt'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZNSt3__110__function16__policy_invokerIFvRN8restinio18acceptor_options_tEEE11__call_implINS0_12__alloc_funcIZNS2_37create_default_unique_object_instanceINS_8functionIS5_EEEEDavEUlS4_E_NS_9allocatorISC_EES5_EEEEvPKNS0_16__policy_storageES4_[_ZNSt3__110__function16__policy_invokerIFvRN8restinio18acceptor_options_tEEE11__call_implINS0_12__alloc_funcIZNS2_37create_default_unique_object_instanceINS_8functionIS5_EEEEDavEUlS4_E_NS_9allocatorISC_EES5_EEEEvPKNS0_16__policy_storageES4_]+0x76): undefined reference to `setsockopt'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `asio::basic_socket_acceptor<asio::ip::tcp, asio::any_io_executor>::local_endpoint() const':
main.cpp:(.text._ZNK4asio21basic_socket_acceptorINS_2ip3tcpENS_15any_io_executorEE14local_endpointEv[_ZNK4asio21basic_socket_acceptorINS_2ip3tcpENS_15any_io_executorEE14local_endpointEv]+0x65): undefined reference to `getsockname'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `restinio::impl::acceptor_t<restinio::traits_t<restinio::asio_timer_manager_t, restinio::null_logger_t, restinio::details::autodetect_request_handler_type, asio::any_io_executor, asio::basic_stream_socket<asio::ip::tcp, asio::any_io_executor> > >::try_extract_actual_address_from_variant(std::__1::variant<restinio::details::no_address_specified_t, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, asio::ip::address> const&)':
main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE]+0x10f): undefined reference to `inet_pton'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE]+0x15b): undefined reference to `if_nametoindex'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE]+0x32d): undefined reference to `inet_pton'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39try_extract_actual_address_from_variantERKNSt3__17variantIJNS5_22no_address_specified_tENSF_12basic_stringIcNSF_11char_traitsIcEENSF_9allocatorIcEEEENSA_7addressEEEE]+0x371): undefined reference to `inet_pton'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `restinio::impl::acceptor_t<restinio::traits_t<restinio::asio_timer_manager_t, restinio::null_logger_t, restinio::details::autodetect_request_handler_type, asio::any_io_executor, asio::basic_stream_socket<asio::ip::tcp, asio::any_io_executor> > >::open()':
main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE4openEv[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE4openEv]+0x156): undefined reference to `socket'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE4openEv[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE4openEv]+0x201): undefined reference to `bind'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE4openEv[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE4openEv]+0x281): undefined reference to `listen'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `restinio::impl::connection_t<restinio::traits_t<restinio::asio_timer_manager_t, restinio::null_logger_t, restinio::details::autodetect_request_handler_type, asio::any_io_executor, asio::basic_stream_socket<asio::ip::tcp, asio::any_io_executor> > >::close()':
main.cpp:(.text._ZN8restinio4impl12connection_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE5closeEv[_ZN8restinio4impl12connection_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE5closeEv]+0x40): undefined reference to `shutdown'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `restinio::impl::acceptor_t<restinio::traits_t<restinio::asio_timer_manager_t, restinio::null_logger_t, restinio::details::autodetect_request_handler_type, asio::any_io_executor, asio::basic_stream_socket<asio::ip::tcp, asio::any_io_executor> > >::accept_connection_for_socket_with_index(unsigned long)':
main.cpp:(.text._ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39accept_connection_for_socket_with_indexEm[_ZN8restinio4impl10acceptor_tINS_8traits_tINS_20asio_timer_manager_tENS_13null_logger_tENS_7details31autodetect_request_handler_typeEN4asio15any_io_executorENS7_19basic_stream_socketINS7_2ip3tcpES8_EEEEE39accept_connection_for_socket_with_indexEm]+0xc2): undefined reference to `getpeername'
/home/path/qnx710/host/linux/x86_64/usr/bin/x86_64-pc-nto-qnx7.1.0-ld: CMakeFiles/output.dir/main.cpp.o: in function `void asio::detail::executor_function::complete<asio::detail::binder1<asio::executor_binder<restinio::impl::acceptor_t<restinio::traits_t<restinio::asio_timer_manager_t, restinio::null_logger_t, restinio::details::autodetect_request_handler_type, asio::any_io_executor, asio::basic_stream_socket<asio::ip::tcp, asio::any_io_executor> > >::call_accept_now(unsigned long)::{lambda(auto:1 const&)#1}, asio::any_io_executor>, std::__1::error_code>, asio::executor_binder<restinio::impl::acceptor_t<restinio::traits_t<restinio::asio_timer_manager_t, restinio::null_logger_t, restinio::details::autodetect_request_handler_type, asio::any_io_executor, asio::basic_stream_socket<asio::ip::tcp, asio::any_io_executor> > >::call_accept_now(unsigned long)::{lambda(auto:1 const&)#1}, asio::any_io_executor>::allocator<void> >(asio::detail::executor_function::impl_base*, bool)':
main.cpp:(.text._ZN4asio6detail17executor_function8completeINS0_7binder1INS_15executor_binderIZN8restinio4impl10acceptor_tINS5_8traits_tINS5_20asio_timer_manager_tENS5_13null_logger_tENS5_7details31autodetect_request_handler_typeENS_15any_io_executorENS_19basic_stream_socketINS_2ip3tcpESD_EEEEE15call_accept_nowEmEUlRKT_E_SD_EENSt3__110error_codeEEENSP_9allocatorIvEEEEvPNS1_9impl_baseEb[_ZN4asio6detail17executor_function8completeINS0_7binder1INS_15executor_binderIZN8restinio4impl10acceptor_tINS5_8traits_tINS5_20asio_timer_manager_tENS5_13null_logger_tENS5_7details31autodetect_request_handler_typeENS_15any_io_executorENS_19basic_stream_socketINS_2ip3tcpESD_EEEEE15call_accept_nowEmEUlRKT_E_SD_EENSt3__110error_codeEEENSP_9allocatorIvEEEEvPNS1_9impl_baseEb]+0x21c): undefined reference to `getpeername'
gmake[2]: *** [CMakeFiles/output.dir/build.make:115: output] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/output.dir/all] Error 2
.
from conan.
Hi, I would like to close this thread as I have solve the issue.
For the cross-compilation, particularly for QNX
I have to include compiler (particularly relevent target compiler) in CMake for both, for c
and c++
and then it generated a conan_toolchain.cmake
that has all the settings for the cross-compilation. then I compiles this RESTinio
project using QNX
compiler as a result I got the header only
libraries for my Makefile based project.
Following are few details for the future readers that could help them.
In my CMake
file I added
message(STATUS "CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
message(STATUS "CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
Furthermore, I need to create a conan
header only package so that I can use in my Makefile
based project and compile using QNX compiler
. There are few dependencies that RESTinio
requires but in case of QNX these dependencies was not working,for example asio
so I created a conan .patch
file to change the asio implementation required for QNX
(there is a pending PR at the time of this writing, so I manually put these changes in .patch file). I also created a .patch file for RESTino
that handled the issue sendfile_operation
to set it as a default implementation.
I also need to include the macros inside my CMake
file
target_compile_definitions(RESTinio-app PRIVATE "RESTINIO_ENABLE_SENDFILE_DEFAULT_IMPL" "ASIO_HAS_PTHREADS")
Once the Package has created, I also need to define QNX
compiler setting in Makefile based project like below,
CC = qcc -lang-c -Vgcc_nto$(PLATFORM) -std=gnu11 -vv
CXX = q++ -lang-c++ -Vgcc_nto$(PLATFORM)_cxx -std=gnu++17 -vv
Finally, I am able to create C++
REST API using RESTinio
and is now working fine in the QNX OS
. There are more little details & issues but these can be solved using Google
search.
I would like to say a big thanks, to MR @memsharded for his kind support for all these process.
from conan.
Related Issues (20)
- [question] Keying packages on libstdc++ version? Autodetecting it? HOT 4
- [bug] Library 'XXX' not found in package. If 'XXX' is a system library, declare it with 'cpp_info.system_libs' property HOT 3
- [question] Clarifications re: local-repo index vs. binary artifacts… HOT 3
- self.conf.get used in set_version method HOT 2
- [question] I am experminting with the patch feature and I want ask what is the standard way to do an extention that analyze the dependencies graph for the sake of validations on the binaries outside the standard analyze binaries method HOT 1
- [bug] when crossbuilding, CMakeToolchain does not set system name and processor variables if user toolchain is provided
- [question] Conan 1 and Conan 2 package coexistence in Artifactory? HOT 5
- Cannot cross-compile for Android NDK 19C HOT 2
- [not-bug] "conan list" prints letter Z instead of a last digit when printing dependency versions e.g. "zlib/1.3.Z" HOT 2
- [question] "recommended flow" for updating a dependency in a lockfile without pulling other dependencies? HOT 5
- [bug] Wrong paths to profiles in docker runner HOT 1
- [bug] conan inspect is not showing requirements HOT 4
- [question] How to validate Options of a Dependency Package in conan v1 HOT 10
- [question] Conan SSL Errors With Artifactory HOT 4
- [question] How to properly "evolve" lockfiles? HOT 12
- [question] Migrating custom generator + user_info to Conan 2.0 HOT 3
- [question] cpp_info in editable mode HOT 1
- Building Qt 6.5.3 fails using conan 2.1.0 and 2.5.0 HOT 5
- [bug] Setting environment-variables via `[buildenv]` or `[runenv]` from profiles stores leading/trailing spaces in value HOT 3
- [question] Conan 'home' with CI/CD Runners HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.