Giter Club home page Giter Club logo

Comments (9)

idavidstory avatar idavidstory commented on May 24, 2024 1

Appending "-lprotobuf-c" to this line in the generated Makefile seems to fix it.
LIBS = -lprotobuf-c

from protobuf-c-rpc.

SirNexus avatar SirNexus commented on May 24, 2024

I'm getting this as well

from protobuf-c-rpc.

zhbinary avatar zhbinary commented on May 24, 2024

How to fix it?

from protobuf-c-rpc.

idavidstory avatar idavidstory commented on May 24, 2024

Getting the same error, can someone please post the fix?

from protobuf-c-rpc.

idavidstory avatar idavidstory commented on May 24, 2024

Looks like the symbols are provided by protobuf-c.
I built and installed that first.
storybook$ egrep -e 'host_cpu|build_cpu' protobuf-c/Makefile protobuf-c-rpc/Makefile
protobuf-c/Makefile:build_cpu = x86_64
protobuf-c/Makefile:host_cpu = x86_64
protobuf-c-rpc/Makefile:build_cpu = x86_64
protobuf-c-rpc/Makefile:host_cpu = x86_64
storybook$ ls -l /usr/local/lib/libprotobuf-c*
-rwxr-xr-x 1 dstory admin 50216 May 8 07:29 /usr/local/lib/libprotobuf-c.1.dylib
-rw-r--r-- 1 dstory admin 147384 May 8 07:29 /usr/local/lib/libprotobuf-c.a
lrwxr-xr-x 1 dstory admin 21 May 8 07:29 /usr/local/lib/libprotobuf-c.dylib -> libprotobuf-c.1.dylib
-rwxr-xr-x 1 dstory admin 945 May 8 07:29 /usr/local/lib/libprotobuf-c.la

Still getting the same link error.

from protobuf-c-rpc.

lipnitsk avatar lipnitsk commented on May 24, 2024

Please post your ./configure output.

from protobuf-c-rpc.

idavidstory avatar idavidstory commented on May 24, 2024

dstorybook13$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-apple-darwin19.4.0
checking host system type... x86_64-apple-darwin19.4.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin19.4.0 file names to x86_64-apple-darwin19.4.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin19.4.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.4.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking malloc.h usability... no
checking malloc.h presence... no
checking for malloc.h... no
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking for unistd.h... (cached) yes
checking winsock.h usability... no
checking winsock.h presence... no
checking for winsock.h... no
checking for library containing hstrerror... none required
checking for library containing connect... none required
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libprotobuf_c... yes
checking for protoc-c... /usr/local/bin/protoc-c
checking whether self tests are run under valgrind... no
checking whether to build with code coverage support... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating protobuf-c-rpc/libprotobuf-c-rpc.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

protobuf-c-rpc 0.1

    CC:                     gcc
    CFLAGS:                 -g -O2
    LDFLAGS:                
    LIBS:                   

    prefix:                 /usr/local
    sysconfdir:             ${prefix}/etc
    libdir:                 ${exec_prefix}/lib
    includedir:             ${prefix}/include
    pkgconfigdir:           ${libdir}/pkgconfig

from protobuf-c-rpc.

lipnitsk avatar lipnitsk commented on May 24, 2024

I'm puzzled why the library build fails with this. Maybe it's a Mac specific issue somehow? On Linux the library builds just fine with those symbols left unresolved. Why is your platform forcing those symbols to be resolved at library build time?

When a test executable is built it needs to be linked against libprotobuf-c:
Makefile.am:

77 t_test_rpc_LDADD = \
78         $(libprotobuf_c_LIBS) \
79         protobuf-c-rpc/libprotobuf-c-rpc.la

from protobuf-c-rpc.

lipnitsk avatar lipnitsk commented on May 24, 2024

Okay, tracked it down to the -no-undefined flag in Makefile.am. I guess Mac OS is stricter about this than Linux. Should be fixed in 44f1e87

from protobuf-c-rpc.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.