conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
7.95k stars 951 forks source link

[question] unable to link header files using conan2.4 #16513

Open FaiqueAli opened 1 week ago

FaiqueAli commented 1 week ago

What is your question?

Hi, I am trzing to use a RESTinio pkg using conan2.4. the pkg has build successfully but when I call the basic helloworld main.cpp file I got following error

`fatal error: restinio/core.hpp: No such file or directory

include <restinio/core.hpp>

conan install .. --build missing --profile:build=default --profile:host=aarch64

Profile host: [settings] arch=armv8 compiler=qcc compiler.libcxx=cxx compiler.version=4.4 os=Neutrino os.version=6.5 [runenv] CC=qcc CXX=QCC

Profile build: [settings] arch=x86_64 build_type=Debug compiler=qcc compiler.libcxx=cxx compiler.version=4.4 os=Linux

cmake -DCMAKE_TOOLCHAIN_FILE=/path/qnx.nto.toolchain.cmake -DCMAKE_BUILD_TYPE=Debug .. -- 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: /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: /path/qnx710/host/linux/x86_64/usr/bin/q++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Conan: Component target declared 'fmt::fmt' -- Conan: Target declared 'llhttp::llhttp' -- Conan: Component target declared 'nonstd::expected-lite' -- Conan: Target declared 'asio::asio' -- Conan: Target declared 'restinio::restinio' -- Configuring done -- Generating done -- Build files have been written to: /path/build

cmake --build . [ 50%] Building CXX object CMakeFiles/QNX-restinio-app.dir/main.cpp.o /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

Cmakelist.txt ... find_package(fmt REQUIRED) add_executable(restinio-app main.cpp) target_link_libraries(QNX-restinio-app restinio::restinio) ... `

Have you read the CONTRIBUTING guide?

memsharded commented 1 week ago

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.

FaiqueAli commented 1 week ago

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 :)

memsharded commented 1 week ago

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

FaiqueAli commented 1 week ago

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)
memsharded commented 1 week ago

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.

FaiqueAli commented 1 week ago

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..

memsharded commented 1 week ago

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.

FaiqueAli commented 1 week ago

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
memsharded commented 1 week ago
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:

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.

FaiqueAli commented 1 week ago

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
memsharded commented 1 week ago

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.

FaiqueAli commented 1 week ago

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'
memsharded commented 1 week ago

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.

FaiqueAli commented 1 week ago

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..

memsharded commented 1 week ago

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!

FaiqueAli commented 1 week ago

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.

memsharded commented 1 week ago

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?

FaiqueAli commented 1 week ago
$ 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
FaiqueAli commented 1 week ago
$ 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
memsharded commented 1 week ago

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.

FaiqueAli commented 1 week ago

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
FaiqueAli commented 1 week ago

Hi @memsharded, Could you please check my last steps and the outcome thanks :)

FaiqueAli commented 6 days ago

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
FaiqueAli commented 5 days ago

Hi @memsharded, still waiting for your feedback..

memsharded commented 5 days ago

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?

memsharded commented 5 days ago

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?

FaiqueAli commented 4 days ago

@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
FaiqueAli commented 4 days ago

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.

memsharded commented 4 days ago

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.

FaiqueAli commented 4 days ago

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.

memsharded commented 4 days ago

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.