datalad / datalad-ukbiobank

Resources for working with UKBiobank as a DataLad dataset
MIT License
6 stars 12 forks source link

git-annex special remote for data access #2

Closed mih closed 4 years ago

mih commented 5 years ago

Would need to wrap their ukbfetch tool. Available in semi-source form from http://biobank.ctsu.ox.ac.uk/crystal/refer.cgi?id=645

wget -nd biobank.ctsu.ox.ac.uk/crystal/crystal/util/ukbfetch_linkset.tar

jbpoline commented 5 years ago

Maybe for Lex to look at it ? @AlexandreHutton (not priority) see RIA for archiving the initial zip

mih commented 4 years ago

The provided static lib does not link on modern systems:

% make
g++ -Dint_lnx -O   -c -o ukbfetch.o ukbfetch.cpp
g++ -o ukbfetch ukbfetch.o -L. -lufetch -lz
/usr/bin/ld: ./libufetch.a(ufetch.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(reposit.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(ftarget.o): relocation R_X86_64_PC32 against symbol `_ZNSsC1ERKSs@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(webfetch.o): relocation R_X86_64_32S against symbol `_ZTV9WEB_FETCH' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(bulcom.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(fetutil.o): relocation R_X86_64_PC32 against symbol `strtol@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(xaes.o): relocation R_X86_64_32S against symbol `_ZTV4XAES' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(xtime.o): relocation R_X86_64_32S against symbol `_ZTV5XDATE' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(xerror.o): relocation R_X86_64_PC32 against symbol `_ZNSsC1ERKSs@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(xencode.o): relocation R_X86_64_32 against symbol `_ZN7XENCODE10last_errorE' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(xbinob.o): relocation R_X86_64_PC32 against symbol `malloc@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(rosetta.o): relocation R_X86_64_PC32 against symbol `tolower@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(authkey.o): relocation R_X86_64_32S against symbol `_ZTV8AUTH_KEY' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(xmd5.o): relocation R_X86_64_PC32 against symbol `memcpy@@GLIBC_2.14' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(aeskey.o): relocation R_X86_64_32S against symbol `t_fl' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(aescrypt.o): relocation R_X86_64_32S against symbol `t_fn' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(comcrypt.o): relocation R_X86_64_32S against symbol `_ZTV8COMCRYPT' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(kipper.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(rosebase.o): relocation R_X86_64_PC32 against symbol `_ZNSsC1ERKSs@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./libufetch.a(aestab.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: ukbfetch] Error 1

Unclear if there is a workaround.

mih commented 4 years ago

This makes it run

iff --git a/Makefile b/Makefile
index 31eec40..5387a08 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ LDLIN=-linterp.1
 CXXFLAGS=$(CCXXFLAGS)

 ukbfetch : ukbfetch.o libufetch.a
-       $(CXX) -o ukbfetch $< -L. -lufetch -lz
+       $(CXX) -no-pie -o ukbfetch $< -L. -lufetch -lz

 clean:
        rm *.o
mih commented 4 years ago

I will close this now. I think the present setup works well enough.