Skip to content

fix build with gcc 5.4.0#491

Merged
ca333 merged 2 commits intoGLEECBTC:devfrom
DeckerSU:patch-dev-build
Sep 19, 2021
Merged

fix build with gcc 5.4.0#491
ca333 merged 2 commits intoGLEECBTC:devfrom
DeckerSU:patch-dev-build

Conversation

@DeckerSU
Copy link
Copy Markdown

without these changes you will catch several linkage errors, like:

/usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-mini-gmp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
libbitcoin_server.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

More detailed information:
DeckerSU@d99e7d2

Since we added mini-gmp.c as a part of libbitcoin_server_a_SOURCES,
-fPIC is required to avoid the linkage error:

/usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-mini-gmp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
libbitcoin_server.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

TODO: In future we should totally (!) get rid of mini-gmp.c, for example,
same way as i did here - bf14e82 ,
bcz actually we using only two functions from this mini-gmp.c - it's
bitcoin_base58decode and bitcoin_base58encode, which are perfectly
could be replaced with C++ analogs DecodeBase58, EncodeBase58 from
base58.h
@ca333 ca333 merged commit 0ec03ed into GLEECBTC:dev Sep 19, 2021
who-biz pushed a commit to who-biz/komodo that referenced this pull request Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants