Skip to content

Paddle Debug版本编译过程中,报错HTTP page not retrieved #72379

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

Open
wangguan1995 opened this issue Apr 21, 2025 · 5 comments
Open

Paddle Debug版本编译过程中,报错HTTP page not retrieved #72379

wangguan1995 opened this issue Apr 21, 2025 · 5 comments
Assignees

Comments

@wangguan1995
Copy link

wangguan1995 commented Apr 21, 2025

bug描述 Describe the Bug

Image

commit id 0a85d41775961fc85b8d3aa8a843194d80dc9f00
gcc (GCC) 12.1.0
g++ (GCC) 12.1.0
GNU ld (GNU Binutils) 2.33.1
export https_proxy=
export http_proxy=
cmake .. \
    -GNinja \
    -DCMAKE_BUILD_TYPE=Debug \
    -DPY_VERSION=3.10 \
    -DWITH_GPU=ON \
    -DWITH_AVX=OFF \
    -DWITH_DISTRIBUTE=ON \
    -DCMAKE_C_COMPILER=/usr/local/gcc-12.1/bin/gcc \
    -DCMAKE_CXX_COMPILER=/usr/local/gcc-12.1/bin/g++ \
 2>&1 | tee cmake_0421.log

其他补充信息 Additional Supplementary Information

No response

@GuoxiaWang
Copy link
Contributor

这个没找到正常,没找到的话,就会重新编译。

@wangguan1995
Copy link
Author

wangguan1995 commented Apr 21, 2025

具体编译时报错:

<pre style="white-space: pre-wrap;">
FAILED: paddle/phi/CMakeFiles/phi_core.dir/kernels/fusion/gpu/fused_dropout_add_grad_kernel.cu.o 
/usr/local/bin/ccache /usr/local/cuda/bin/nvcc -forward-unknown-to-host-compiler -DBRPC_WITH_GLOG -DCUDA_TOOLKIT_ROOT_DIR=\"/usr/local/cuda\" -DCUDA_VERSION_MAJOR=\"12\" -DCUDA_VERSION_MINOR=\"3\" -DCUDNN_MAJOR_VERSION=\"9\" -DEIGEN_USE_GPU -DGLOG_NO_ABBREVIATED_SEVERITIES -DLAPACK_FOUND -DPADDLE_DISABLE_PROFILER -DPADDLE_DLL_EXPORT -DPADDLE_ON_INFERENCE -DPADDLE_USE_PTHREAD_BARRIER -DPADDLE_USE_PTHREAD_SPINLOCK -DPADDLE_VERSION=0.0.0 -DPADDLE_VERSION_INTEGER=0 -DPADDLE_WITH_AVX512F -DPADDLE_WITH_CCCL -DPADDLE_WITH_CRYPTO -DPADDLE_WITH_CUDA -DPADDLE_WITH_CUPTI -DPADDLE_WITH_CUTLASS -DPADDLE_WITH_DGC -DPADDLE_WITH_DISTRIBUTE -DPADDLE_WITH_DNNL -DPADDLE_WITH_FLASHATTN -DPADDLE_WITH_GLOO -DPADDLE_WITH_MEMORY_EFFICIENT_ATTENTION -DPADDLE_WITH_MKLML -DPADDLE_WITH_NCCL -DPADDLE_WITH_POCKETFFT -DPADDLE_WITH_PSCORE -DPADDLE_WITH_RPC -DPADDLE_WITH_SSE3 -DPADDLE_WITH_XBYAK -DPHI_INNER -DPHI_SHARED -DSPCONV_WITH_CUTLASS=0 -DSTATIC_IR -DTRT_PLUGIN_FP16_AVAILABLE -DXBYAK64 -DXBYAK_NO_OP_NAMES -DYAML_CPP_STATIC_DEFINE -Dphi_core_EXPORTS -I../third_party/cccl/thrust -I../third_party/cccl/libcudacxx/include -I../third_party/cccl/cub -I. -I../paddle/fluid/framework/io -Ithird_party/install/zlib/include -Ithird_party/install -Ithird_party/install/gflags/include -Ithird_party/install/glog/include -I../third_party/cutlass -I../third_party/cutlass/include -I../third_party/cutlass/tools/util/include -I../third_party/eigen3 -I../third_party/threadpool -I../third_party/dlpack/include -Ithird_party/install/xxhash/include -Ithird_party/install/warpctc/include -Ithird_party/install/warprnnt/include -Ithird_party/install/utf8proc/include -Ithird_party/install/mklml/include -Ithird_party/install/onednn/include -Ithird_party/install/protobuf/include -I../third_party/nlohmann_json/include -Ithird_party/install/yaml-cpp/include -I/usr/include/python3.10 -I/usr/local/lib/python3.10/dist-packages/numpy/core/include -Ithird_party/pybind/src/extern_pybind/include -Ithird_party/install/gtest/include -I../third_party/cccl -Ithird_party/install/gloo/include -Ithird_party/install/snappy/include -Ithird_party/install/leveldb/include -Ithird_party/install/brpc/include -Ithird_party/install/libmct/include -Ithird_party/install/rocksdb/include -Ithird_party/install/jemalloc/include -Ithird_party/install/afs_api/include -Ithird_party/install/xbyak/include -Ithird_party/install/xbyak/include/xbyak -Ithird_party/install/dgc/include -Ithird_party/install/cryptopp/include -Ithird_party/pocketfft/src -Ithird_party/install/flashattn/include -I/usr/local/cuda/targets/x86_64-linux/include -I/usr/local/cuda/include -I../ -I../paddle/fluid/framework/io --cudart shared -D_MWAITXINTRIN_H_INCLUDED -D__STRICT_ANSI__ -Wno-deprecated-gpu-targets  -gencode arch=compute_80,code=sm_80 -w --expt-relaxed-constexpr --expt-extended-lambda  -Xcompiler="-Wall" -Xcompiler="-Wextra" -Xcompiler="-Werror" -Xcompiler="-fPIC" -Xcompiler="-fno-omit-frame-pointer" -Xcompiler="-Wno-unused-parameter" -Xcompiler="-Wno-unused-function" -Xcompiler="-Wno-error=literal-suffix" -Xcompiler="-Wno-error=unused-local-typedefs" -Xcompiler="-Wno-error=unused-function" -Xcompiler="-Wno-error=array-bounds" -Xcompiler="-msse3" -g -Xcompiler=-fPIC -std=c++17 -MD -MT paddle/phi/CMakeFiles/phi_core.dir/kernels/fusion/gpu/fused_dropout_add_kernel.cu.o -MF paddle/phi/CMakeFiles/phi_core.dir/kernels/fusion/gpu/fused_dropout_add_kernel.cu.o.d -x cu -c ../paddle/phi/kernels/fusion/gpu/fused_dropout_add_kernel.cu -o paddle/phi/CMakeFiles/phi_core.dir/kernels/fusion/gpu/fused_dropout_add_kernel.cu.o
../paddle/phi/kernels/funcs/dropout_impl.cu.h(363): error: identifier "seed_tensor_ptr" is undefined
               seed_tensor_ptr == nullptr
               ^

1 error detected in the compilation of "../paddle/phi/kernels/fusion/gpu/fused_dropout_add_kernel.cu".

错误原因分析
未定义标识符:
seed_tensor_ptr 在代码中被使用,但编译器找不到其定义。可能原因包括:
拼写错误:变量名拼写错误(如 seed_tensor_ptr vs. seed_tensor_ptr_)。
作用域问题:变量未在当前作用域声明,或声明在条件编译块中未启用。
头文件缺失:定义 seed_tensor_ptr 的头文件未包含。
代码上下文:
错误出现在 dropout_impl.cu.h 的第 363 行,检查该行附近的代码逻辑:

@wangguan1995
Copy link
Author

wangguan1995 commented Apr 21, 2025

错误原因分析
未定义的引用:
cudaStreamEndCapture@@libcudart.so.12 是 CUDA 库中的函数,链接器(ld)找不到其定义。
这通常是因为链接命令中未包含 CUDA 运行时库(-lcudart)。
DSO missing from command line:
动态共享对象(DSO)缺失,表明链接器在命令中未找到所需的库文件。

FAILED: paddle/phi/tools/print_phi_kernels 
: && /usr/local/gcc-12.1/bin/g++ -Wno-error=uninitialized -Wno-error=deprecated-declarations -Wno-deprecated-declarations -Wno-error=maybe-uninitialized -std=c++17 -m64 -fPIC -fno-omit-frame-pointer -pipe -ffunction-sections -fdata-sections -Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-error=array-bounds -Wno-error=ignored-attributes -Wno-error=int-in-bool-context -Wimplicit-fallthrough=0 -Wno-error=deprecated-copy -Wno-ignored-qualifiers -Wno-ignored-attributes -Wno-parentheses -fopenmp -msse3 -g  paddle/phi/tools/CMakeFiles/print_phi_kernels.dir/print_phi_kernels.cc.o -o paddle/phi/tools/print_phi_kernels -L/workspace/Paddle/Paddle/build/third_party/install/onednn/lib   -L/workspace/Paddle/Paddle/build/third_party/install/mklml/lib -Wl,-rpath,/workspace/Paddle/Paddle/build/paddle/phi:/workspace/Paddle/Paddle/build/paddle/common:/workspace/Paddle/Paddle/build/third_party/install/onednn/lib:/workspace/Paddle/Paddle/build/third_party/install/mklml/lib  -lpthread  third_party/install/glog/lib/libglog.a  third_party/install/yaml-cpp/lib/libyaml-cpp.a  paddle/phi/libphi.so  paddle/phi/libphi_gpu.so  paddle/phi/libphi_core.so  paddle/common/libcommon.so  -lrt  paddle/phi/api/profiler/libphi_profiler_proto.a  paddle/phi/core/distributed/auto_parallel/libauto_parallel_proto.a  third_party/install/xxhash/lib/libxxhash.a  libcblas.a  third_party/install/utf8proc/lib/libutf8proc.a  paddle/phi/core/framework/libpass_desc_proto.a  paddle/phi/core/framework/libtrainer_desc_proto.a  paddle/phi/core/framework/libframework_proto.a  paddle/phi/core/framework/libdata_feed_proto.a  paddle/phi/core/framework/libheter_service_proto.a  paddle/phi/core/libexternal_error_proto.a  third_party/install/protobuf/lib/libprotobuf.a  libonednn.a  -ldnnl  -liomp5  third_party/install/gloo/lib/libgloo.a  paddle/phi/backends/dynload/libdynload_mklml.a  -lpthread  third_party/install/glog/lib/libglog.a  third_party/install/yaml-cpp/lib/libyaml-cpp.a  -L/workspace/Paddle/Paddle/build/third_party/install/mklml/lib -liomp5 -Wl,--as-needed  third_party/install/dgc/lib/libdgc.a -pthread -ldl -lrt -lz -lssl -lcrypto && :
/usr/local/bin/ld: paddle/phi/tools/CMakeFiles/print_phi_kernels.dir/print_phi_kernels.cc.o: undefined reference to symbol 'cudaStreamEndCapture@@libcudart.so.12'
/usr/local/bin/ld: /usr/local/cuda-12.3/targets/x86_64-linux/lib/libcudart.so.12: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

@0x3878f
Copy link
Contributor

0x3878f commented Apr 21, 2025

错误原因分析 未定义的引用: cudaStreamEndCapture@@libcudart.so.12 是 CUDA 库中的函数,链接器(ld)找不到其定义。 这通常是因为链接命令中未包含 CUDA 运行时库(-lcudart)。 DSO missing from command line: 动态共享对象(DSO)缺失,表明链接器在命令中未找到所需的库文件。

问题解决了吗?-DCMAKE_BUILD_TYPE=Release 可以编译过吗?

@0x3878f 0x3878f pinned this issue Apr 21, 2025
@0x3878f 0x3878f unpinned this issue Apr 21, 2025
@wangguan1995
Copy link
Author

现在需要编译Debug版本

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

No branches or pull requests

3 participants