iCyberon / pg_ulid

Universally Unique Lexicographically Sortable Identifier (ULID) for PostgreSQL
MIT License
59 stars 4 forks source link

compile error #4

Closed basaran closed 3 years ago

basaran commented 3 years ago

Hello,

During compile, I'm getting this:

➜  pg_ulid git:(master) make
Makefile:25: warning: overriding recipe for target 'pg_ulid.so'
/usr/lib/postgresql/13/lib/pgxs/src/makefiles/../../src/Makefile.shlib:293: warning: ignoring old recipe for target 'pg_ulid.so'
make: Circular pg_ulid.so <- pg_ulid.so dependency dropped.
go build -buildmode=c-shared -o pg_ulid.so main.go pg_ulid.go
# runtime/cgo
gcc: error: unrecognized command line option ‘--unresolved-symbols=ignore-all’
make: *** [Makefile:25: pg_ulid.so] Error 2
➜  pg_ulid git:(master) gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
➜  pg_ulid git:(master) clang -v
clang version 10.0.0-4ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/9
Candidate multilib: .;@m64
Selected multilib: .;@m64
Linux DESKTOP-V3GQE54 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
➜  pg_ulid git:(master) ld -v
GNU ld (GNU Binutils for Ubuntu) 2.34
basaran commented 3 years ago

there is an extra space in the Makefile

LDFLAGS = -Wl, --unresolved-symbols=ignore-all

should be

LDFLAGS = -Wl,--unresolved-symbols=ignore-all

after that it seemed to have compiled fine, I will try it shortly.

basaran commented 3 years ago

closing due to inactivty