Omega359 opened a new issue, #10472:
URL: https://github.com/apache/datafusion/issues/10472

   ### Describe the bug
   
   ```
   55.32 The following warnings were emitted during compilation:
   55.33
   55.33 warning: In file included from c_src/mimalloc/src/alloc.c:14,
   55.33 warning:                  from c_src/mimalloc/src/static.c:23:
   55.33 warning: c_src/mimalloc/include/mimalloc/prim.h: In function 
'_mi_thread_id':
   55.33 warning: c_src/mimalloc/include/mimalloc/prim.h:240:21: error: 
'__builtin_thread_pointer' is not supported on this target
   55.33 warning:   240 |   return (uintptr_t)__builtin_thread_pointer();
   55.33 warning:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   55.33 warning: c_src/mimalloc/include/mimalloc/prim.h: In function 'mi_free':
   55.33 warning: c_src/mimalloc/include/mimalloc/prim.h:240:21: error: 
'__builtin_thread_pointer' is not supported on this target
   55.33 warning:   240 |   return (uintptr_t)__builtin_thread_pointer();
   55.33 warning:       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   55.33
   55.33 error: failed to run custom build command for `libmimalloc-sys v0.1.37`
   55.33
   55.33 Caused by:
   55.33   process didn't exit successfully: 
`/usr/src/arrow-datafusion/datafusion-cli/target/release/build/libmimalloc-sys-db181bce148c3b71/build-script-build`
 (exit status: 1)
   55.33   --- stdout
   55.33   OPT_LEVEL = Some("3")
   55.33   TARGET = Some("x86_64-unknown-linux-gnu")
   55.33   HOST = Some("x86_64-unknown-linux-gnu")
   55.33   cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
   55.33   CC_x86_64-unknown-linux-gnu = None
   55.33   cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
   55.33   CC_x86_64_unknown_linux_gnu = None
   55.33   cargo:rerun-if-env-changed=HOST_CC
   55.33   HOST_CC = None
   55.33   cargo:rerun-if-env-changed=CC
   55.33   CC = None
   55.33   cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
   55.33   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
   55.33   CRATE_CC_NO_DEFAULTS = None
   55.33   DEBUG = Some("false")
   55.33   CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
   55.33   cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
   55.33   CFLAGS_x86_64-unknown-linux-gnu = None
   55.33   cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
   55.33   CFLAGS_x86_64_unknown_linux_gnu = None
   55.33   cargo:rerun-if-env-changed=HOST_CFLAGS
   55.33   HOST_CFLAGS = None
   55.33   cargo:rerun-if-env-changed=CFLAGS
   55.33   CFLAGS = None
   55.33   cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
   55.33   cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
   55.33   CRATE_CC_NO_DEFAULTS = None
   55.33   CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
   55.33   cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
   55.33   CFLAGS_x86_64-unknown-linux-gnu = None
   55.33   cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
   55.33   CFLAGS_x86_64_unknown_linux_gnu = None
   55.33   cargo:rerun-if-env-changed=HOST_CFLAGS
   55.33   HOST_CFLAGS = None
   55.33   cargo:rerun-if-env-changed=CFLAGS
   55.33   CFLAGS = None
   55.33   cargo:warning=In file included from c_src/mimalloc/src/alloc.c:14,
   55.33   cargo:warning=                 from c_src/mimalloc/src/static.c:23:
   55.33   cargo:warning=c_src/mimalloc/include/mimalloc/prim.h: In function 
'_mi_thread_id':
   55.33   cargo:warning=c_src/mimalloc/include/mimalloc/prim.h:240:21: error: 
'__builtin_thread_pointer' is not supported on this target
   55.33   cargo:warning=  240 |   return (uintptr_t)__builtin_thread_pointer();
   55.33   cargo:warning=      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   55.33   cargo:warning=c_src/mimalloc/include/mimalloc/prim.h: In function 
'mi_free':
   55.33   cargo:warning=c_src/mimalloc/include/mimalloc/prim.h:240:21: error: 
'__builtin_thread_pointer' is not supported on this target
   55.33   cargo:warning=  240 |   return (uintptr_t)__builtin_thread_pointer();
   55.33   cargo:warning=      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   55.33
   55.33   --- stderr
   55.33
   55.33
   55.33   error occurred: Command "cc" "-O3" "-ffunction-sections" 
"-fdata-sections" "-fPIC" "-m64" "-I" "c_src/mimalloc/include" "-I" 
"c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" 
"-DMI_DEBUG=0" "-o" 
"/usr/src/arrow-datafusion/datafusion-cli/target/release/build/libmimalloc-sys-0190b3ee425b41ed/out/98cfcaec7182b1d8-static.o"
 "-c" "c_src/mimalloc/src/static.c" with args cc did not execute successfully 
(status code exit status: 1).
   55.33
   55.33
   55.33 warning: build failed, waiting for other jobs to finish...
   ------
   Dockerfile:29
   --------------------
     27 |     RUN rustup component add rustfmt
     28 |
     29 | >>> RUN cargo build --release
     30 |
     31 |     FROM debian:bullseye-slim
   --------------------
   ERROR: failed to solve: process "/bin/sh -c cargo build --release" did not 
complete successfully: exit code: 101
   ```
   
   ### To Reproduce
   
   run
   `docker build -f datafusion-cli/Dockerfile . --tag datafusion-cli`
   
   ### Expected behavior
   
   Docker should build the CLI correctly.
   
   ### Additional context
   
   Updating the Dockerfile to the following allows the build to succeed:
   
   ```
   
   FROM rust:1.78-bookworm as builder
   
   COPY . /usr/src/arrow-datafusion
   COPY ./datafusion /usr/src/arrow-datafusion/datafusion
   
   COPY ./datafusion-cli /usr/src/arrow-datafusion/datafusion-cli
   
   WORKDIR /usr/src/arrow-datafusion/datafusion-cli
   
   RUN rustup component add rustfmt
   
   RUN cargo build --release
   
   FROM debian:bookworm-slim
   
   COPY --from=builder 
/usr/src/arrow-datafusion/datafusion-cli/target/release/datafusion-cli 
/usr/local/bin
   
   ENTRYPOINT ["datafusion-cli"]
   
   CMD ["--data-path", "/data"]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to