Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile source code error. #163

Closed
cuteDen-ECNU opened this issue Oct 30, 2023 · 8 comments · Fixed by #174
Closed

Compile source code error. #163

cuteDen-ECNU opened this issue Oct 30, 2023 · 8 comments · Fixed by #174

Comments

@cuteDen-ECNU
Copy link

cuteDen-ECNU commented Oct 30, 2023

Hi! When I compile the source code, I encounter this issue:

/script/duckdb_spatial/spatial/src/spatial/core/functions/table/st_read_osm.cpp:94:16: error: could not convert 'result' from 'unique_ptr<spatial::core::BindData,default_deletespatial::core::BindData,[...]>' to 'unique_ptr<duckdb::FunctionData,default_deleteduckdb::FunctionData,[...]>'
94 | return result;
| ^~~~~~
| |
| unique_ptr<spatial::core::BindData,default_deletespatial::core::BindData,[...]>

My Cmake version is 3.22 that is newer than 3.20:

cmake version 3.22.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).

And My g++ version is 12.3, the newest version that can be accessed using a package manager.

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 12.3.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-ALHxjy/gcc-12-12.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-ALHxjy/gcc-12-12.3.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04) 
@Maxxen
Copy link
Member

Maxxen commented Oct 30, 2023

Hmm, strange that CI hasnt caught this. We need to insert an std::move before the return. I can push a fix soon.

@cuteDen-ECNU
Copy link
Author

Thank you very much!

@Maxxen
Copy link
Member

Maxxen commented Oct 30, 2023

Thanks for reporting this issue! It should now be fixed in #164

@Maxxen Maxxen closed this as completed Oct 30, 2023
@cuteDen-ECNU
Copy link
Author

It could be missed. 🤔
/script/duckdb_spatial/spatial/src/spatial/core/functions/table/st_read_osm.cpp:255:16: error: could not convert 'global_state' from 'unique_ptr<spatial::core::GlobalState,default_deletespatial::core::GlobalState,[...]>' to 'unique_ptr<duckdb::GlobalTableFunctionState,default_deleteduckdb::GlobalTableFunctionState,[...]>'
255 | return global_state;
| ^~~~~~~~~~~~
| |
| unique_ptr<spatial::core::GlobalState,default_deletespatial::core::GlobalState,[...]>

@Maxxen
Copy link
Member

Maxxen commented Oct 30, 2023

Yeah, seems like I missed some other spots. This is only a problem on older version of GCC due to DuckDB implementing its own unique_ptr class, so I can't test it easily locally. Ill try to fix the rest of the occurrences in the next PR I make (soon hopefully)

@Maxxen Maxxen reopened this Oct 30, 2023
@cuteDen-ECNU
Copy link
Author

This is only a problem on older version of GCC due to DuckDB implementing its own unique_ptr class

Which the gcc and g++ versions you are using? Mine is 12.3.0.
gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1~22.04)

@Maxxen
Copy link
Member

Maxxen commented Nov 1, 2023

Im using Clang :) - but I think I fixed some more stuff in the latest push, does it work now? Otherwise I'll set up a VM and try myself. Although the CI does build with GCC 10.2.1, so maybe its not just version age that's the problem. https://github.com/duckdb/duckdb_spatial/actions/runs/6694204601/job/18187005832

@cuteDen-ECNU
Copy link
Author

Successfully compile it using clang. ^^ Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants