huggingface / text-embeddings-inference

A blazing fast inference solution for text embeddings models
https://huggingface.co/docs/text-embeddings-inference/quick_tour
Apache License 2.0
2.83k stars 178 forks source link

local build error: linking with `cc` failed #202

Open gctian opened 8 months ago

gctian commented 8 months ago

System Info

GPU: A100 Python:3.10.13

Information

Tasks

Reproduction

cargo install --path router -F candle-cuda -F http --no-default-features,use this command to build.

this is error message:

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/data/miniconda3/envs/search/bin:/usr/local/cuda/bin:/data/miniconda3/envs/search/bin:/home/work/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/bin/remote-cli:/usr/local/cuda/bin:/home/work/.cargo/bin:/data/miniconda3/condabin:/usr/local/cuda/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/work/bin:/home/work/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustcPNLbst/symbols.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.10gzl7t7i8jre1k0.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.10hzd9n2iwqo71z5.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.10t4l238zebl0hj5.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.10z0pjfm37zeo4mn.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.11qzc76lae38eedx.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.11ztwhrrru5tkqvd.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.128r6rsb1hqnn7fp.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5alyewouzlftikf1.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5b950mhnei0oigxw.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5do1a02nqep1fvht.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5e0mvkba0zx777v3.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5ewn0c9c2j4vgl03.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5g3839x0g2f67gzf.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.5gannth4dewv79mg.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.75975f871wgzi6q.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.7k4n8ezvvx2dhjt.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.8nuebuyp2m7jmfy.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.8p89i46gjahs8nm.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.9bvjfrcqli87r6w.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.9kzqwp667ns7jle.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.9mmbawcpr8s98ol.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.al99ba6oti2sr42.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.as1cxjquo3mpx82.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.b4a8ba1y3kayb1i.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.bmfi89la37oeyqo.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.bwpa67phx0mebac.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.bz4816vbyqslmu8.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.dtismu1at1hiryl.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.e55wr8jrzvc1mcw.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.e7d1ymmyz35gs13.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.fbndg7hkelglfa.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.hhdjpyeavdnjc88.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.hi51ds0a7y5txj7.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.i8dkgy8vxhk70n1.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.jdj2pxt3uurg5f4.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.jxpe6ckm1jbrknj.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.khfw7nmuxe550g7.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.kuvz25snlc7a1lp.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.lt8hrn8m6k4mfw2.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.mcqx3helwhjjenf.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.mdbhs0s8v47ydte.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.mszbow2f7gk5cfu.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.noog2b0ein9apyw.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.nsd93qycmq8uwp4.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.onrjyqizqmmcnyw.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.p2v1dk36k3ajp3q.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.p3luul8xmymhwpl.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.r3plujunmjy29f5.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.rr6lodh2eavli51.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.swlv1b47jb02y2v.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.twpu1w0abor0wfk.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.u5iq39n7e4mqcpt.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.ucuctpa6qy8enm6.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.umbwf5oi0bog1ty.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.vp2588fblocpgb8.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.x4hbehpeg1t2oj4.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.x8se3oblmqkvv9m.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.xc9lbihrt8po3um.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.xfkj8jylcy14ryb.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.xt19lvnnbdupw34.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.xy3cu6kozjji1dj.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.yxc8l24bsg4x0p1.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.zb657genb9tz434.rcgu.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558.2ls5wrr742d5o0bd.rcgu.o" "-Wl,--as-needed" "-L" "/home/work/search/text-embeddings-inference/target/release/deps" "-L" "/usr/local/openssl/lib" "-L" "/home/work/search/text-embeddings-inference/target/release/build/ring-0cb4074aef22557c/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/libmimalloc-sys-ac8c7876d068bf73/out" "-L" "/usr/local/cuda/lib64" "-L" "/usr/local/cuda/lib64/stubs" "-L" "/usr/local/cuda/targets/x86_64-linux" "-L" "/usr/local/cuda/targets/x86_64-linux/lib" "-L" "/usr/local/cuda/targets/x86_64-linux/lib/stubs" "-L" "/home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/candle-layer-norm-6e06769fecfe746e/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/candle-rotary-f84de1e6e69504ac/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/esaxx-rs-04fa29c18a882bd7/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/onig_sys-03cd655a56b68a8d/out" "-L" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/work/search/text-embeddings-inference/target/release/deps/libtext_embeddings_router-4bed55fb79905b77.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libinit_tracing_opentelemetry-6e16f3016506b4aa.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtracing_opentelemetry-8201a2d864589e99.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtracing_log-4bb419d80b005896.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libutoipa_swagger_ui-a5694415c1f5a9e1.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libmime_guess-224ede8c6396c63a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libunicase-7951dc5f8facffda.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librust_embed-c80b9ed43697c4c8.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librust_embed_utils-82011052ffa3bb0a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libwalkdir-c69aca89ec32a687.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsame_file-44881e920637258d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsha2-ce292f72485db26c.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcpufeatures-74c11591b3209ede.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libdigest-76d35b43d7f69b80.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libblock_buffer-c1287ec4a2943060.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcrypto_common-a07afaebd362a42a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgeneric_array-f0c24512fc234a34.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtypenum-51caf43490318848.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libutoipa-d4c49fb748c764d5.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtower_http-f5f19febfcedca14.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtext_embeddings_core-7dc30611297e0fcc.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtokenizers-34e69ca5f752726a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libesaxx_rs-b1f33e5e4216ef53.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libunicode_normalization_alignments-00c5094d041d5c76.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libspm_precompiled-31871fbae0b0330e.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libbase64-d6ce80791199c36f.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libunicode_segmentation-0dc2072c7f0ca77a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libnom-8d8275966acc613b.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libunicode_categories-e112528dc87b982a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libitertools-9f70bc6cfa145f36.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libmonostate-c4e90e06cc80255d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libmacro_rules_attribute-88a05ec805fb9419.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librayon_cond-96d14b46d787bb59.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libitertools-d07e250ed8525e49.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libonig-c058065444e12e24.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libonig_sys-ffbed254a51251b0.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libderive_builder-72efcf657bc116af.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libhf_hub-36f6953306de30ac.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libdirs-90f9d614d44ebb50.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libdirs_sys-6f27601744eb2608.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/liboption_ext-3b0565149b400a61.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libureq-3a25d3376cf639a5.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libwebpki_roots-dc0ee0eb84aec884.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librustls-ecaad72168fcd35d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsubtle-6173f9398db9541a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libwebpki-848ccc6656db887a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libring-c5f41ffbbde403f7.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libspin-5ea9223f45c4e29a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libuntrusted-8414257db2d0fb91.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libzeroize-ed69f96021855f5a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librustls_pki_types-0904fd221b3f3a4c.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsocks-918f0ac8e705a58e.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libstable_deref_trait-b0c2e410b7a62c1d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsafetensors-b79acd44d25c9df8.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libserde_json-99c847dd29f5c619.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libitoa-743e075cb1a5f48c.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libryu-cc4b86b0ef7b6a7d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libserde-b8c76880db9dfe81.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcudarc-0ab5f1b431091be4.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcandle_kernels-787aeba0fb429da4.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm-b7bce699eed447b2.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm_c32-8fa1a9ef3de7b8a7.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm_c64-d4ce9184e8c39c28.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm_f64-d4886872537dfa4c.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm_f16-63d8f1a9c7ea1e6f.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm_f32-939e0290b9b42d41.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgemm_common-89d7574fa02b2579.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libpulp-eb0b3132107430f7.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libnum_complex-3dce7636101dfbc4.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libdyn_stack-0306b89a0a4e0787.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libreborrow-c4f328f72516a5b9.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libraw_cpuid-fb575e8861d277b2.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libbitflags-371e20dff1886c1b.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librayon-2f7274bee02fdb84.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librayon_core-8be4a7cfcaced313.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcrossbeam_deque-d8bee1edc61f7855.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcrossbeam_epoch-1c7195edcef79840.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libeither-cb5ccb33e746d6d3.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libbyteorder-686c21af3f560a7c.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libhalf-a3b39e6d0e9abb2a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librand_distr-fb7978c4d557cbda.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libbytemuck-d3c81337670795b2.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtracing-6012d4b98d7e2314.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/liblog-61d641ef61ec3a85.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtracing_core-3e0b5e1fe53815b6.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtext_embeddings_backend_core-97dc359cda9582bc.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libnohash_hasher-80015a7375a59901.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libopentelemetry-aab3e46a1303ea15.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libopentelemetry_sdk-e7bdb1889e8e13c1.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtokio_stream-306117254d2cc958.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_executor-14422337ad8da6ec.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcrossbeam_channel-0028ac7a2b8e4350.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcrossbeam_utils-14ca9f1909f495dd.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libtokio-26ac29d509263619.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsignal_hook_registry-e17e604f99b7c7c6.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libnum_cpus-1014403569a29e96.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsocket2-6e33847194eb990a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libbytes-218e335d4d65dc2a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libmio-088de7242786502c.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libparking_lot-9cefbfba29d501ca.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libparking_lot_core-63fae06f09b62890.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libsmallvec-01f650bd612e2d50.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/liblock_api-dd7bcd932c3543ac.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libscopeguard-a20ba1b5cee69886.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librand-418f0c45ead01111.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librand_chacha-7a8db341856e5485.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libppv_lite86-d0ba822ef0a782de.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/librand_core-4d847dffbf964a7d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libgetrandom-dd73da305f0bdc9f.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcfg_if-f3c600c4b645a111.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libpercent_encoding-879bdabc5696b9fb.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libregex-e38c1501de74c911.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libregex_automata-acdba6be5a9c12ca.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libaho_corasick-10ba218162b58a72.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libregex_syntax-86302f58876b1833.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libordered_float-44256d793d7dfef1.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libnum_traits-52e6495ca2ed27d1.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libopentelemetry_api-d49401c401174fa9.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_util-b497664d5c3ada67.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libmemchr-e98cf7eff0dabdb6.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_io-00cce16cc0dc7224.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libslab-abe7b170e433f96e.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libpin_project_lite-9217bd743052b986.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_task-fc1ae89e9f2a1ec7.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libpin_utils-ba20c0f03d280328.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_channel-f0a23d2734c617ab.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_sink-f842deee9f262bd5.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libfutures_core-42bcd98ce7df60b6.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libthiserror-f67a139171a80012.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libindexmap-5b37ceae8038a0cb.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libhashbrown-63e08932d77f3ce8.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/liburlencoding-3df63388529daf8e.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libonce_cell-bb3c8ef4751f69d5.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libmimalloc-f930e35f1188f468.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/liblibmimalloc_sys-abbcbbe9e3732d80.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/liblibc-1e51bc03beeae28a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libclap-9fb32be2573bf0ba.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libclap_builder-d33f1deb63478829.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libstrsim-69cc8e0e58b76c19.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libanstream-6c1f3f7f25f2f296.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libanstyle_query-f83e65537221bfda.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libcolorchoice-a4adbc87c5f05394.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libanstyle_parse-c121e88cc177465d.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libutf8parse-379c90adbc807789.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libclap_lex-867f1458ff3bd3b4.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libanstyle-0204ff050e155a8a.rlib" "/home/work/search/text-embeddings-inference/target/release/deps/libanyhow-f3cf7a4bccaf12eb.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-90f6ddbf82de36ec.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_abort-5069a31f57314e46.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-db744c0ca03eed1d.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-8ba652dc7d4b285a.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-d5f4520a9ebc0d58.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-4ad84de58f0cb463.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0d10aae2e0f38735.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-0c17cff739e6745b.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b29e17139dde1aa8.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1f975299829cc7bd.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-86bae3bc3079f89b.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-321b82c30dffdf5f.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-3dd8a6810a0bdfef.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-eb39a61c0c879984.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-aa769569f91c3548.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-510a192a50a983ed.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-0577018320f99037.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-193cf992125ccd4c.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8e138eaf26ebb4a8.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lssl" "-lcrypto" "-lrotary" "-lcudart" "-lstdc++" "-llayernorm" "-lcudart" "-lstdc++" "-lflashattention" "-lcudart" "-lstdc++" "-lcuda" "-lnvrtc" "-lcurand" "-lcublas" "-lcublasLt" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-c9187e5e2d78f558" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-rotary-f84de1e6e69504ac/out/librotary.a(rotary-b6f3db7aa1741882.o): relocation R_X86_64_32 against symbol `_ZN4vllm23rotary_embedding_kernelIfLb0EEEvPT_S2_PKS1_S4_illiii' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-layer-norm-6e06769fecfe746e/out/liblayernorm.a(ln_api.o): relocation R_X86_64_32 against symbol `_ZN10layer_norm13ln_fwd_kernelINS_13Kernel_traitsIfffffjLj256ELj1ELj4ELj1ELj16ENS_18Kernel_traits_baseILj256EfffffjLj128EEEEELb1ELb1ELb1ELb1EEEvNS_9FwdParamsE' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_api-59d12f2bec85f63.o): relocation R_X86_64_32 against `.nvFatBinSegment' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim128_fp16_sm80-759fdfecd1f0ed1c.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi128ELi64ELi64ELi4ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi128ELi64ELi64ELi4ES2_EELb0ELb1ELb0ELb0ELb0ELb1ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim160_fp16_sm80-17db6cdd19f7f98b.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi160ELi64ELi64ELi4ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi160ELi64ELi64ELi4ES2_EELb1ELb1ELb0ELb0ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim192_fp16_sm80-3981fe996a7e8814.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi192ELi64ELi64ELi4ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi192ELi64ELi64ELi4ES2_EELb1ELb1ELb0ELb1ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim224_fp16_sm80-54d101fd022eab36.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi224ELi128ELi64ELi8ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi224ELi128ELi64ELi8ES2_EELb1ELb1ELb0ELb0ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim256_fp16_sm80-6bbb415157454ca9.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi256ELi128ELi64ELi8ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi256ELi128ELi64ELi8ES2_EELb1ELb1ELb0ELb0ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim32_fp16_sm80-3a7585e74a278dc3.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi32ELi128ELi128ELi4ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi32ELi128ELi128ELi4ES2_EELb0ELb1ELb0ELb1ELb1ELb1ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim64_fp16_sm80-a93563dad84e2972.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi64ELi128ELi128ELi4ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi64ELi128ELi128ELi4ES2_EELb0ELb1ELb0ELb1ELb1ELb1ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim96_fp16_sm80-791226771e2c8c97.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi96ELi128ELi64ELi4ELb0ELb0EN7cutlass6half_tE19Flash_kernel_traitsILi96ELi128ELi64ELi4ES2_EELb0ELb0ELb1ELb1ELb0ELb0ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim128_bf16_sm80-f1ff254233809e96.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi128ELi64ELi64ELi4ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi128ELi64ELi64ELi4ES2_EELb0ELb1ELb0ELb0ELb0ELb1ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim160_bf16_sm80-b8e226bc00ecbaf1.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi160ELi64ELi64ELi4ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi160ELi64ELi64ELi4ES2_EELb1ELb1ELb0ELb0ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim192_bf16_sm80-f7453c8601d43b17.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi192ELi64ELi64ELi4ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi192ELi64ELi64ELi4ES2_EELb1ELb1ELb0ELb1ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim224_bf16_sm80-9b2b93dbac21043c.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi224ELi128ELi64ELi8ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi224ELi128ELi64ELi8ES2_EELb1ELb1ELb0ELb0ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim256_bf16_sm80-21dd0f7dd998e506.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi256ELi128ELi64ELi8ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi256ELi128ELi64ELi8ES2_EELb1ELb1ELb0ELb0ELb0ELb1ELb1EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim32_bf16_sm80-aca7d8fdce93ef53.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi32ELi128ELi128ELi4ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi32ELi128ELi128ELi4ES2_EELb0ELb1ELb0ELb1ELb1ELb1ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim64_bf16_sm80-eaa7ce7f57eb7351.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi64ELi128ELi128ELi4ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi64ELi128ELi128ELi4ES2_EELb0ELb1ELb0ELb1ELb1ELb1ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-7c648b9a9da7630a/out/libflashattention.a(flash_fwd_hdim96_bf16_sm80-f51ba409eb93ce41.o): relocation R_X86_64_32 against symbol `_Z16flash_fwd_kernelI23Flash_fwd_kernel_traitsILi96ELi128ELi64ELi4ELb0ELb0EN7cutlass10bfloat16_tE19Flash_kernel_traitsILi96ELi128ELi64ELi4ES2_EELb0ELb0ELb1ELb1ELb0ELb0ELb0EEv16Flash_fwd_params' can not be used when making a PIE object; recompile with -fPIE
          collect2: error: ld returned 1 exit status

error: could not compile `text-embeddings-router` (bin "text-embeddings-router") due to previous error
error: failed to compile `text-embeddings-router v1.1.0 (/home/work/search/text-embeddings-inference/router)`, intermediate artifacts can be found at `/home/work/search/text-embeddings-inference/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Thanks.

Expected behavior

build successful,and can use 'text-embeddings-router' cmd

OlivierDehaene commented 8 months ago

What version of nvcc and gcc do you have?

gctian commented 8 months ago

What version of nvcc and gcc do you have?

image

ikalista commented 7 months ago

I have a very evil method you can say try it, I'm getting a recompile with -fPIC error, then I solved it by doing this #59 .

RUN: find / -name build.rs | grep candle-flash-attn, then you can find the build code for candle-flash-attn.

In the right place add: .arg("--compiler-options") .arg("-fPIE")

cargo clean and rebuild

gctian commented 7 months ago

I have a very evil method you can say try it, I'm getting a recompile with -fPIC error, then I solved it by doing this #59 .

RUN: find / -name build.rs | grep candle-flash-attn, then you can find the build code for candle-flash-attn.

In the right place add: .arg("--compiler-options") .arg("-fPIE")

cargo clean and rebuild

Thanks, I tried, but still got the error, and the error message this time has become very short.

error: linking with `cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/data/miniconda3/envs/search/bin:/usr/local/cuda/bin:/data/miniconda3/envs/search/bin:/home/work/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/bin/remote-cli:/usr/local/cuda/bin:/home/work/.cargo/bin:/data/miniconda3/condabin:/usr/local/cuda/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/work/bin:/home/work/bin" VSLANG="1033" "cc" "-m64" "/tmp/rustc7lX7Vv/symbols.o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-aedef450ae8423fb.text_embeddings_router-cd21587c1b6864dd.46b75xtg3t69j2xs.rcgu.o.rcgu.o" "-Wl,--as-needed" "-L" "/home/work/search/text-embeddings-inference/target/release/deps" "-L" "/usr/local/openssl/lib" "-L" "/home/work/search/text-embeddings-inference/target/release/build/ring-4013101abfe8aaa6/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/libmimalloc-sys-bbc5687bef7082a2/out" "-L" "/usr/local/cuda/lib64" "-L" "/usr/local/cuda/lib64/stubs" "-L" "/usr/local/cuda/targets/x86_64-linux" "-L" "/usr/local/cuda/targets/x86_64-linux/lib" "-L" "/usr/local/cuda/targets/x86_64-linux/lib/stubs" "-L" "/home/work/search/text-embeddings-inference/target/release/build/candle-flash-attn-894bcc1066d6869e/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/candle-layer-norm-2be8037f8b590827/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/candle-rotary-29f1133020e96866/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/esaxx-rs-43332f15536379a3/out" "-L" "/home/work/search/text-embeddings-inference/target/release/build/onig_sys-d79b1ed81dfb3450/out" "-L" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/rustc7lX7Vv/libesaxx_rs-0837297a42d47e28.rlib" "/tmp/rustc7lX7Vv/libonig_sys-ec90d3a8fb007da0.rlib" "/tmp/rustc7lX7Vv/libring-f6f9fd261d1c845a.rlib" "/tmp/rustc7lX7Vv/liblibmimalloc_sys-868ba60de6477d6b.rlib" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-8e138eaf26ebb4a8.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lssl" "-lcrypto" "-lrotary" "-lcudart" "-lstdc++" "-llayernorm" "-lcudart" "-lstdc++" "-lflashattention" "-lcudart" "-lstdc++" "-lcuda" "-lnvrtc" "-lcurand" "-lcublas" "-lcublasLt" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/work/.rustup/toolchains/1.75.0-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/work/search/text-embeddings-inference/target/release/deps/text_embeddings_router-aedef450ae8423fb" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"
  = note: /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-rotary-29f1133020e96866/out/librotary.a(rotary-b6f3db7aa1741882.o): relocation R_X86_64_32 against symbol `_ZN4vllm23rotary_embedding_kernelIfLb0EEEvPT_S2_PKS1_S4_illiii' can not be used when making a PIE object; recompile with -fPIE
          /usr/bin/ld: /home/work/search/text-embeddings-inference/target/release/build/candle-layer-norm-2be8037f8b590827/out/liblayernorm.a(ln_api.o): relocation R_X86_64_32 against symbol `_ZN10layer_norm13ln_fwd_kernelINS_13Kernel_traitsIfffffjLj256ELj1ELj4ELj1ELj16ENS_18Kernel_traits_baseILj256EfffffjLj128EEEEELb1ELb1ELb1ELb1EEEvNS_9FwdParamsE' can not be used when making a PIE object; recompile with -fPIE
          collect2: error: ld returned 1 exit status

error: could not compile `text-embeddings-router` (bin "text-embeddings-router") due to previous error
error: failed to compile `text-embeddings-router v1.1.0 (/home/work/search/text-embeddings-inference/router)`, intermediate artifacts can be found at `/home/work/search/text-embeddings-inference/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

This is my modification.

    let builder = bindgen_cuda::Builder::default()
        .kernel_paths(kernels)
        .out_dir(build_dir.clone())
        .arg("-std=c++17")
        .arg("-O3")
        .arg("--compiler-options")
        .arg("-fPIC")
        .arg("-U__CUDA_NO_HALF_OPERATORS__")
        .arg("-U__CUDA_NO_HALF_CONVERSIONS__")
        .arg("-U__CUDA_NO_HALF2_OPERATORS__")
        .arg("-U__CUDA_NO_BFLOAT16_CONVERSIONS__")
        .arg("-Icutlass/include")
        .arg("--expt-relaxed-constexpr")
        .arg("--expt-extended-lambda")
        .arg("--use_fast_math")
        .arg("--verbose");
gctian commented 7 months ago

Fixed,also add two lines of code to the build.rs of candle-layer-normcandle-rotary solved the problem

OlivierDehaene commented 7 months ago

Your gcc version is very old and I think that's the rootcause but I'm honestly not sure.

ikalista commented 7 months ago

Your gcc version is very old and I think that's the rootcause but I'm honestly not sure.

I'm building from Dockerfile-cuda

The curl in the [nvidia/cuda:12.2.0-devel-ubuntu22.04] seemed to have problems in my environment, so I switched to [nvidia/cuda:12.3.2-devel-centos7]

Then I found out [nvidia/cuda:12.3.2-devel-centos7]'s gcc version is too low (about 4.8.5), how official image was build successfully from nvidia office images? image

I'm still experiencing the compile tag issue above after manually upgrading gcc to 9.x.x, I still need to manually modify the build.rs file to make the build successful, honestly not sure what happened XD