-
Notifications
You must be signed in to change notification settings - Fork 572
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
ubuntu编译出错,求救! #281
Comments
这是改完后的tileset.cpp文件 #include #include "extern.h" /////////////////////// extern "C" bool epsg_convert(int insrs, double* val, char* path) { extern "C" bool wkt_convert(char* wkt, double* val, char* path) { extern "C"
} std::vector transfrom_xyz(double radian_x, double radian_y, double height_min){
} extern "C" void transform_c(double center_x, double center_y, double height_min, double* ptr) { bool write_tileset_box(
} bool write_tileset_region(
} /*/
} |
warning: ./src/earcut.hpp:460:23: error: ‘numeric_limits’ is not a member of ‘std’ 没安装 C++ 开发环境?用什么编译器,支持C++什么版本? |
linux 源码里没带 gdal 库支持,可以参考下issue里其他人编译成功的说明 |
已增加 Ubuntu 的 github actions, 参考主页的 Build 指南。 |
y@ty-virtual-machine:~/Desktop/opt/3dtiles$ cargo build --release
Updating crates.io index
warning: spurious network error (3 tries remaining): [7] Couldn't connect to server (Failed to connect to static.crates.io port 443 after 21070 ms: Connection refused)
Downloaded atty v0.2.14
Downloaded strsim v0.8.0
Downloaded quick-error v1.2.3
Downloaded cfg-if v1.0.0
Downloaded bitflags v0.7.0
Downloaded scopeguard v1.2.0
Downloaded log v0.3.9
Downloaded memoffset v0.9.0
Downloaded termcolor v1.4.0
Downloaded textwrap v0.11.0
Downloaded serde-xml-rs v0.2.1
Downloaded either v1.9.0
Downloaded autocfg v1.1.0
Downloaded bitflags v1.3.2
Downloaded unicode-width v0.1.11
Downloaded env_logger v0.5.13
Downloaded itoa v1.0.9
Downloaded humantime v1.3.0
Downloaded iana-time-zone v0.1.58
Downloaded crossbeam-deque v0.8.3
Downloaded vec_map v0.8.2
Downloaded ansi_term v0.12.1
Downloaded byteorder v1.5.0
Downloaded quote v1.0.33
Downloaded unicode-ident v1.0.12
Downloaded crossbeam-utils v0.8.16
Downloaded log v0.4.20
Downloaded xml-rs v0.3.6
Downloaded proc-macro2 v1.0.70
Downloaded ryu v1.0.15
Downloaded num-traits v0.2.17
Downloaded crossbeam-epoch v0.9.15
Downloaded serde_derive v1.0.193
Downloaded cc v1.0.83
Downloaded rayon-core v1.12.0
Downloaded serde v1.0.193
Downloaded memchr v2.6.4
Downloaded serde_json v1.0.108
Downloaded rayon v1.8.0
Downloaded aho-corasick v1.1.2
Downloaded clap v2.34.0
Downloaded chrono v0.4.31
Downloaded regex v1.10.2
Downloaded syn v2.0.39
Downloaded regex-syntax v0.8.2
Downloaded regex-automata v0.4.3
Downloaded libc v0.2.150
Downloaded 47 crates (4.2 MB) in 1m 19s
Compiling autocfg v1.1.0
Compiling libc v0.2.150
Compiling proc-macro2 v1.0.70
Compiling unicode-ident v1.0.12
Compiling memoffset v0.9.0
Compiling crossbeam-utils v0.8.16
Compiling quote v1.0.33
Compiling crossbeam-epoch v0.9.15
Compiling cfg-if v1.0.0
Compiling syn v2.0.39
Compiling serde v1.0.193
Compiling scopeguard v1.2.0
Compiling memchr v2.6.4
Compiling aho-corasick v1.1.2
Compiling serde_derive v1.0.193
Compiling num-traits v0.2.17
Compiling rayon-core v1.12.0
Compiling log v0.4.20
Compiling regex-syntax v0.8.2
Compiling cc v1.0.83
Compiling atty v0.2.14
Compiling regex-automata v0.4.3
Compiling crossbeam-deque v0.8.3
Compiling bitflags v0.7.0
Compiling quick-error v1.2.3
Compiling unicode-width v0.1.11
Compiling serde_json v1.0.108
Compiling textwrap v0.11.0
Compiling humantime v1.3.0
Compiling xml-rs v0.3.6
Compiling regex v1.10.2
Compiling _3dtile v0.1.0 (/home/ty/Desktop/opt/3dtiles)
Compiling log v0.3.9
Compiling itoa v1.0.9
Compiling vec_map v0.8.2
Compiling bitflags v1.3.2
Compiling either v1.9.0
Compiling strsim v0.8.0
Compiling ryu v1.0.15
Compiling iana-time-zone v0.1.58
Compiling ansi_term v0.12.1
Compiling termcolor v1.4.0
Compiling env_logger v0.5.13
Compiling clap v2.34.0
Compiling chrono v0.4.31
Compiling rayon v1.8.0
Compiling serde-xml-rs v0.2.1
The following warnings were emitted during compilation:
warning: ./src/tileset.cpp: In function ‘bool wkt_convert(char*, double*, char*)’:
warning: ./src/tileset.cpp:40:23: warning: ‘OGRErr OGRSpatialReference::importFromWkt(char**)’ is deprecated [-Wdeprecated-declarations]
warning: 40 | inRs.importFromWkt(&wkt);
warning: | ~~~~~~~~~~~~~~~~~~^~~~~~
warning: In file included from ./src/GeoTransform.h:2,
warning: from ./src/tileset.cpp:13:
warning: /usr/include/gdal/ogr_spatialref.h:208:17: note: declared here
warning: 208 | OGRErr importFromWkt( char ** )
warning: | ^~~~~~~~~~~~~
warning: In file included from ./src/shp23dtile.cpp:6:
warning: ./src/earcut.hpp: In member function ‘mapbox::detail::Earcut::Node* mapbox::detail::Earcut::findHoleBridge(mapbox::detail::Earcut::Node*, mapbox::detail::Earcut::Node*)’:
warning: ./src/earcut.hpp:460:23: error: ‘numeric_limits’ is not a member of ‘std’
warning: 460 | double qx = -std::numeric_limits::infinity();
warning: | ^~~~~~~~~~~~~~
warning: ./src/earcut.hpp:460:38: error: expected primary-expression before ‘double’
warning: 460 | double qx = -std::numeric_limits::infinity();
warning: | ^~~~~~
warning: ./src/earcut.hpp:489:26: error: ‘numeric_limits’ is not a member of ‘std’
warning: 489 | double tanMin = std::numeric_limits::infinity();
warning: | ^~~~~~~~~~~~~~
warning: ./src/earcut.hpp:489:41: error: expected primary-expression before ‘double’
warning: 489 | double tanMin = std::numeric_limits::infinity();
warning: | ^~~~~~
error: failed to run custom build command for
_3dtile v0.1.0 (/home/ty/Desktop/opt/3dtiles)
Caused by:
process didn't exit successfully:
/home/ty/Desktop/opt/3dtiles/target/release/build/_3dtile-b994adcbfc723bfb/build-script-build
(exit status: 1)--- stdout
TARGET = Some("x86_64-unknown-linux-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu
CXX_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu
CXX_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXX
HOST_CXX = None
cargo:rerun-if-env-changed=CXX
CXX = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu
CXXFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu
CXXFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "./src" "-I" "./src/osg" "-std=c++11" "-o" "/home/ty/Desktop/opt/3dtiles/target/release/build/_3dtile-18b6323a83c4a031/out/./src/tileset.o" "-c" "./src/tileset.cpp"
cargo:warning=./src/tileset.cpp: In function ‘bool wkt_convert(char*, double*, char*)’:
cargo:warning=./src/tileset.cpp:40:23: warning: ‘OGRErr OGRSpatialReference::importFromWkt(char**)’ is deprecated [-Wdeprecated-declarations]
cargo:warning= 40 | inRs.importFromWkt(&wkt);
cargo:warning= | ~~~~~~~~~~~~~~~~~~^~~~~~
cargo:warning=In file included from ./src/GeoTransform.h:2,
cargo:warning= from ./src/tileset.cpp:13:
cargo:warning=/usr/include/gdal/ogr_spatialref.h:208:17: note: declared here
cargo:warning= 208 | OGRErr importFromWkt( char ** )
cargo:warning= | ^~~~~~~~~~~~~
exit status: 0
running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "./src" "-I" "./src/osg" "-std=c++11" "-o" "/home/ty/Desktop/opt/3dtiles/target/release/build/_3dtile-18b6323a83c4a031/out/./src/shp23dtile.o" "-c" "./src/shp23dtile.cpp"
cargo:warning=In file included from ./src/shp23dtile.cpp:6:
cargo:warning=./src/earcut.hpp: In member function ‘mapbox::detail::Earcut::Node* mapbox::detail::Earcut::findHoleBridge(mapbox::detail::Earcut::Node*, mapbox::detail::Earcut::Node*)’:
cargo:warning=./src/earcut.hpp:460:23: error: ‘numeric_limits’ is not a member of ‘std’
cargo:warning= 460 | double qx = -std::numeric_limits::infinity();
cargo:warning= | ^~~~~~~~~~~~~~
cargo:warning=./src/earcut.hpp:460:38: error: expected primary-expression before ‘double’
cargo:warning= 460 | double qx = -std::numeric_limits::infinity();
cargo:warning= | ^~~~~~
cargo:warning=./src/earcut.hpp:489:26: error: ‘numeric_limits’ is not a member of ‘std’
cargo:warning= 489 | double tanMin = std::numeric_limits::infinity();
cargo:warning= | ^~~~~~~~~~~~~~
cargo:warning=./src/earcut.hpp:489:41: error: expected primary-expression before ‘double’
cargo:warning= 489 | double tanMin = std::numeric_limits::infinity();
cargo:warning= | ^~~~~~
exit status: 1
--- stderr
error occurred: Command "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "./src" "-I" "./src/osg" "-std=c++11" "-o" "/home/ty/Desktop/opt/3dtiles/target/release/build/_3dtile-18b6323a83c4a031/out/./src/shp23dtile.o" "-c" "./src/shp23dtile.cpp" with args "c++" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
是我的gdalt太新了吗
ty@ty-virtual-machine:~/Desktop/opt/3dtiles$ gdalinfo --version
GDAL 3.4.3, released 2022/04/22
已经按照教程打开tileset.cpp里面的宏定义
The text was updated successfully, but these errors were encountered: