jackjey / trust-token-demo Goto Github PK
View Code? Open in Web Editor NEWtrust-token demo based on boringssl
trust-token demo based on boringssl
I've downloaded and built BoringSSL without any errors, but I get warnings and errors when I run make (see log below). I guess the important part of this is:
ld: symbol(s) not found for architecture x86_64
Apologies if I'm missing something obvious, but any idea what's going wrong? I'm on MacOS 10.15.6.
I've looked online but not found anything that helps. I've also tried using clang instead of gcc, but I get the same error.
trust-token-demo: make
gcc src/main.c -o bin/main src/util.o src/issue.o src/redeem.o src/key_generator.o -I./boringssl/include -L./boringssl/build/crypto -lcrypto -lpthread
src/main.c:24:14: warning: initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'char *' converts
between pointers to integer types with different sign [-Wpointer-sign]
uint8_t* request_base64 = argv[2];
^ ~~~~~~~
src/main.c:25:40: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts
between pointers to integer types with different sign [-Wpointer-sign]
size_t request_base64_len = strlen(request_base64);
^~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:82:28: note: passing argument to parameter
'__s' here
size_t strlen(const char *__s);
^
src/main.c:43:14: warning: initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'char *' converts
between pointers to integer types with different sign [-Wpointer-sign]
uint8_t* request_base64 = argv[2];
^ ~~~~~~~
src/main.c:44:40: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts
between pointers to integer types with different sign [-Wpointer-sign]
size_t request_base64_len = strlen(request_base64);
^~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/string.h:82:28: note: passing argument to parameter
'__s' here
size_t strlen(const char *__s);
^
4 warnings generated.
ld: warning: ignoring file src/util.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
ld: warning: ignoring file src/issue.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
ld: warning: ignoring file src/redeem.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
ld: warning: ignoring file src/key_generator.o, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 )
Undefined symbols for architecture x86_64:
"_issue", referenced from:
_main in main-a26c29.o
"_key_generate", referenced from:
_main in main-a26c29.o
"_redeem", referenced from:
_main in main-a26c29.o
"_write_file", referenced from:
_main in main-a26c29.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [main] Error 1
trust-token-demo:
Hi Jack
I get some errors when I run make
to run the demo locally
gcc src/main.c -o bin/main src/util.o src/issue.o src/redeem.o src/key_generator.o -I./boringssl/include -L./boringssl/build/crypto -lcrypto -lpthread
src/main.c:26:14: warning: initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
uint8_t* request_base64 = argv[2];
^ ~~~~~~~
src/main.c:27:40: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
size_t request_base64_len = strlen(request_base64);
^~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:82:28: note: passing argument to parameter '__s' here
size_t strlen(const char *__s);
^
src/main.c:45:14: warning: initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
uint8_t* request_base64 = argv[2];
^ ~~~~~~~
src/main.c:46:40: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
size_t request_base64_len = strlen(request_base64);
^~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:82:28: note: passing argument to parameter '__s' here
size_t strlen(const char *__s);
^
Any bright ideas?
Thanks for the demo.
Currently this demo works only on glitch and depends on 3 domains below.
It's difficult to run locally, so adding standalone demo for localhost.
See Also: JackJey/trust-token-issuer-demo#6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.