oatpp / oatpp-sqlite

SQLite adapter for oatpp ORM.
https://oatpp.io/
Apache License 2.0
23 stars 18 forks source link

build fail at UWP #3

Closed KaungZawHtet closed 3 years ago

KaungZawHtet commented 3 years ago

https://github.com/microsoft/vcpkg/pull/14107

lganzzzo commented 3 years ago

Hello @KaungZawHtet ,

https://dev.azure.com/vcpkg/public/_build/results?buildId=44242&view=logs&j=d0b5f9c7-318d-5672-3adb-f75c4e9afab7&t=16b8a01a-91c4-5f0e-47e2-989fedf3d734

Building package oatpp[core]:x64-uwp... done
Installing package oatpp[core]:x64-uwp...
Installing package oatpp[core]:x64-uwp... done
Elapsed time for package oatpp:x64-uwp: 1.876 s
Starting package 2/2: oatpp-sqlite:x64-uwp
Building package oatpp-sqlite[core]:x64-uwp...
Could not locate cached archive: W:\03\035daae6548f205131ee6271bd1db9e3f279e03f.zip
-- Note: oatpp-sqlite only supports static library linkage. Building static library.
-- Downloading https://github.com/oatpp/oatpp-sqlite/archive/932a79f1db5a0dfd6955c8fd84dc7bd2e5962be1.tar.gz...
-- Extracting source D:/downloads/oatpp-oatpp-sqlite-932a79f1db5a0dfd6955c8fd84dc7bd2e5962be1.tar.gz
-- Using source at D:/buildtrees/oatpp-sqlite/src/d2e5962be1-146fcc8dbb.clean
-- Configuring x64-uwp
-- Building x64-uwp-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:141 (message):
    Command failed: D:/downloads/tools/cmake-3.17.2-windows/cmake-3.17.2-win32-x86/bin/cmake.exe --build . --config Debug --target install -- /p:VCPkgLocalAppDataDisabled=true /p:UseIntelMKL=No /m
    Working Directory: D:/buildtrees/oatpp-sqlite/x64-uwp-dbg
    See logs for more information:
      D:\buildtrees\oatpp-sqlite\install-x64-uwp-dbg-out.log

I don't know what this error message means. If you know where to find some meaningful logs please post them here.

Regards, Leonid

KaungZawHtet commented 3 years ago

@lganzzzo they replied at microsoft/vcpkg#14107 now . You can directly communicate with them too if needed

KaungZawHtet commented 3 years ago

Is build ok at you now after the commits ?

lganzzzo commented 3 years ago

Yes, now it should be ok. Just take the latest master - it will use external SQLite by default.

KaungZawHtet commented 3 years ago

I m in the progress of oatpp-sqlite PR. Check other db adapters, eg. Oatpp-PostgreSQL, too if they have same nature with oatpp-sqlite. If not so complex, those should be added into the vcpkg port pool too.

KaungZawHtet commented 3 years ago

build failed. This time, even on linux

lganzzzo commented 3 years ago

Are any logs available? Logs in the vcpkg CI tells me nothing.

KaungZawHtet commented 3 years ago

Check the link. They replied with log

lganzzzo commented 3 years ago
CMake Error at D:/downloads/tools/cmake-3.18.4-windows/cmake-3.18.4-win32-x86/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find SQLite3 (missing: SQLite3_INCLUDE_DIR SQLite3_LIBRARY)
Call Stack (most recent call first):
  D:/downloads/tools/cmake-3.18.4-windows/cmake-3.18.4-win32-x86/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  D:/downloads/tools/cmake-3.18.4-windows/cmake-3.18.4-win32-x86/share/cmake-3.18/Modules/FindSQLite3.cmake:52 (find_package_handle_standard_args)
  C:/a/1/s/scripts/buildsystems/vcpkg.cmake:536 (_find_package)
  CMakeLists.txt:108 (find_package)

Ok, now the SQLite package is not found. I'm not familiar with vcpkg packages, but I think it should be specified somewhere that oatpp-sqlite depends on SQLite- to install sqlite first.

KaungZawHtet commented 3 years ago

The build is in success now after experimenting with forked oatpp-sqlite. Build failed because of naming :

find_package(unofficial-sqlite3 CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)

check some improvement here If you wish, I will make PR at master.

lganzzzo commented 3 years ago

Hey @KaungZawHtet ,

The build is in success now after experimenting with forked oatpp-sqlite.

Nice, Great work!

If you wish, I will make PR at master.

Sounds good! The only thing I would ask you is to fix indents please like this:

if(NOT OATPP_SQLITE_AMALGAMATION)

    #In case of vcpkg, specific finding is required because of unofficiality
    if(VCPKG_TOOLCHAIN )
        message("\nvcpkg is on\n")
        find_package(unofficial-sqlite3 CONFIG REQUIRED)
    else()
        find_package(SQLite3 REQUIRED)
    endif()

    message("SQLite3_INCLUDE_DIRS=${SQLite3_INCLUDE_DIRS}")
    message("SQLite3_LIBRARIES=${SQLite3_LIBRARIES}")
    message("SQLite3_VERSION=${SQLite3_VERSION}")

endif()
lganzzzo commented 3 years ago

Fixed in https://github.com/oatpp/oatpp-sqlite/pull/8