Skip to content

sparcv9-sun-solaris linking error undefined reference to __sysconf_xpg7'` #1730

@Wyvern

Description

@Wyvern

sparcv9-sun-solaris cross build got linking error:

error: linking with `sparcv9-sun-solaris2.10-gcc` failed: exit status: 1
  │
  ├ note:  "sparcv9-sun-solaris2.10-gcc" "-m64" "<1 object files omitted>" "-Wl,-z,ignore" "-Wl,-Bstatic" "/project/build-dir/sparcv9-sun-solaris/src/build/compiler_builtins/1cba6cf8fd5c5c75/deps/libcompiler_builtins-1cba6cf8fd5c5c75.rlib" "-Wl,-Bdynamic" "-lsendfile" "-llgrp" "-lsocket" "-lposix4" "-lpthread" "-lresolv" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lsendfile" "-llgrp" "-L" "/tmp<sysroot>cJ0efRX/raw-dylibs" "-o" "/project/build-dir/sparcv9-sun-solaris/src/build/Img/26156b48f1a83f81/deps/Img" "-Wl,--strip-all" "-nodefaultlibs"
  ├ note: some arguments are omitted. use `--verbose` to show all linker arguments
  ├ note: /usr/local/lib/gcc/sparcv9-sun-solaris2.10/8.4.0/../../../../sparcv9-sun-solaris2.10/bin/ld: warning: -z ignore ignored.
  │       /project/build-dir/sparcv9-sun-solaris/src/build/Img/26156b48f1a83f81/deps/Img.Img.f3822acec0a0948b-cgu.0.rcgu.o: In function `_RNxC3Img12H8lQSjiMX4h2':
  │       Img.f3822acec0a0948b-cgu.0:(.text._RNxC3Img12H8lQSjiMX4h2+0x65c): undefined reference to `__sysconf_xpg7'
  │       /project/build-dir/sparcv9-sun-solaris/src/build/Img/26156b48f1a83f81/deps/Img.Img.f3822acec0a0948b-cgu.0.rcgu.o: In function `main':
  │       Img.f3822acec0a0948b-cgu.0:(.text.main+0x214): undefined reference to `__sysconf_xpg7'
  │       collect2: error: ld returned 1 exit status
  │       
  ├ note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  ├ note: use the `-l` flag to specify native libraries to link
  ╰ note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

I think sparcv9-sun-solaris2.10 should be upgrade to sparcv9-sun-solaris2.11 to fix this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions