Skip to content
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

build faild with xmake_protobuf_grpc_cpp_plugin exemple #5798

Open
xBLACKICEx opened this issue Nov 21, 2024 · 4 comments
Open

build faild with xmake_protobuf_grpc_cpp_plugin exemple #5798

xBLACKICEx opened this issue Nov 21, 2024 · 4 comments
Labels

Comments

@xBLACKICEx
Copy link

Xmake Version

2.9.6+20241105

Operating System Version and Architecture

windows, ubuntu

Describe Bug

I'm trying to taste the project to compile grpc but it fails to compile, the example is from is hrere :
https://github.com/xmake-io/xmake/blob/dev/tests/projects/c++/protobuf_grpc_cpp_plugin

  • fall to build grpc on ubuntu
  • fall to download some pkgs on windows
    img

Expected Behavior

Dependencies need to be compiled successfully.

Project Configuration

add_rules("mode.debug", "mode.release")
add_requires("protobuf-cpp")
add_requires("grpc", {system = false})

target("test")
    set_kind("binary")
    set_languages("c++17")
    add_packages("protobuf-cpp")
    add_packages("grpc")
    add_rules("protobuf.cpp")
    add_files("src/*.cpp")
    add_files("src/test.proto", {proto_rootdir = "src", proto_grpc_cpp_plugin = true})
    add_files("src/subdir/test2.proto", {proto_rootdir = "src"})

Additional Information and Error Logs

for c-ares the link: https://c-ares.org/download/$(version).tar.gz The reason should be that c-real doesn't have a page like this anymore.
img

But the xmake-repo source code to build c-ares still takes a care

for nasm is the mirror repo is not updates yet ? https://github.com/xmake-mirror/nasm/releases for v2.16.03 ?

https://github.com/xmake-io/xmake-repo/blob/dev/packages/n/nasm/xmake.lua#L11C23-L11C68

build log on ubuntu
xmake - build log.txt

@xBLACKICEx xBLACKICEx added the bug label Nov 21, 2024
@qudix
Copy link
Contributor

qudix commented Nov 21, 2024

In your screenshot it seems it used the fallback urls for c-ares and nasm just fine? It's ok if one of them fails as long as it tries a different one and builds and installs successfully (the broken urls can be fixed later). Of course I can't say for sure with the full logs cut off.

@waruqi
Copy link
Member

waruqi commented Nov 22, 2024

upb link is missing, please provide full logs with -vD.

or you can debug grpc package,

add_links("address_sorting", "upb") --TODO we should add seperate package deps

@waruqi waruqi transferred this issue from xmake-io/xmake Nov 22, 2024
@xBLACKICEx
Copy link
Author

xmake -vD_ubuntu_log.txt
xmake -vD_windows_log.txt

@waruqi here the log with -vD

@aceonics-team
Copy link

aceonics-team commented Nov 25, 2024

I'm getting following errors while building.

[ 98%]: linking.release client
error: /usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_array_realloc'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_ExtensionRegistry_Lookup'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `utf8_range2'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_Status_ErrorMessage'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_DefPool_LoadDefInit'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_Arena_SlowMalloc'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_Arena_Free'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_mapsorter_pushmap'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_Arena_Init'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_Message_AddUnknown'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_Message_Getexts'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_Status_Clear'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_DefPool_New'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_strtable_done'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_strtable_insert'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_kUpb_MiniTable_Empty'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_Message_GetUnknown'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_strtable_remove2'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_strtable_next'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_DefPool_Free'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_JsonEncode'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_alloc_global'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_strtable_lookup2'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_TextEncode'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_strtable_next2'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_mapsorter_pushexts'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_Message_GetOrCreateExtension'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `upb_DefPool_FindMessageByName'
/usr/lib/gcc/aarch64-alpine-linux-musl/13.2.1/../../../../aarch64-alpine-linux-musl/bin/ld: build/linux/arm64-v8a/release/libproto.so: undefined reference to `_upb_Map_New'
collect2: error: ld returned 1 exit status

It seems "upb" as well as "utf8_range2" is not correctly configured.

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

No branches or pull requests

4 participants