Skip to content

Linking error #75

@jamesragray

Description

@jamesragray

When using the all-included option on Ubuntu 21.10 with gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)
got the following linking error:
Linking...
/usr/bin/ld.gold: error: /home/gavin/.dub/packages/d2sqlite3-1.0.0/d2sqlite3/sqlite3.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
Error: /usr/bin/cc failed with status: 1
/home/gavin/dlang/ldc-1.27.1/bin/ldc2 failed with exit code 1.

Was able to build by adding the suggested flag in sqlite.mak:

CC?= /usr/bin/cc
all: sqlite3.o

sqlite3.o: c/sqlite3.c
$(CC) -c -O2 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_UNLOCK_NOTIFY -fPIC c/sqlite3.c

clean:
rm -f *.o

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