Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arduino adapter: missing include #107

Merged
merged 4 commits into from
Jan 27, 2017

Conversation

OlegHahm
Copy link
Collaborator

Hopefully fixes #106.

@OlegHahm
Copy link
Collaborator Author

Disclaimer: untested since I don't know how to build for Arduino.

@blacksheeep
Copy link
Contributor

I get build errors on linux, x86 using this patch:
ccnl-core.c:855:17: error: expected ‘)’ before ‘PRIi32’

@OlegHahm
Copy link
Collaborator Author

That's very interesting. I will investigate.

@OlegHahm
Copy link
Collaborator Author

Apparently, the avr-gcc toolchain doesn't contain a type definition for ssize_t. I changed the PR accordingly.

@OlegHahm
Copy link
Collaborator Author

There were some missing defines for Arduino.

@blacksheeep
Copy link
Contributor

I have still some errors:
ccnl-core.c:855:17: error: expected ‘)’ before ‘PRIi32’
ccnl-core-fwd.c:209:5: error: expected ‘)’ before ‘PRIi32’

@OlegHahm
Copy link
Collaborator Author

Strange since I defined this macro in b7ad12d

@OlegHahm
Copy link
Collaborator Author

@blacksheeep. can you paste the full compiler output and your toolchain version?

@blacksheeep
Copy link
Contributor

blacksheeep commented Jan 27, 2017

Here you go:

make clean USE_NFN=1 USE_NACK=1
*** Configuring for Linux ***
*** With NFN ***
*** With NFN_NACK ***
make[1]: Entering directory `/home/travis/build/cn-uofbasel/ccn-lite/src'
rm -rf *~ *.o  ccn-lite-simu ccn-lite-relay  ccn-nfn-relay ccn-lite-relay-nack ccn-nfn-relay-nack ccn-lite-lnxkernel ccn-lite-simu ccn-nfn-relay ccn-lite-relay-nack ccn-nfn-relay-nack ccn-lite-repo256
rm -rf .ccn-lite-lnxkernel* *.ko *.mod.c *.mod.o .tmp_versions modules.order Module.symvers
rm -rf ccn-lite-omnet.tgz
rm -rf ../bin
make -C util clean
*** With NFN ***
make[2]: Entering directory `/home/travis/build/cn-uofbasel/ccn-lite/src/util'
rm -rf *~ ccn-lite-ccnb2xml ccn-lite-cryptoserver ccn-lite-ctrl ccn-lite-fetch ccn-lite-mkC ccn-lite-mkI ccn-lite-mkF ccn-lite-peek ccn-lite-pktdump ccn-lite-produce ccn-lite-rpc ccn-lite-simplenfn ccn-lite-valid 
rm -rf ../../bin
make[2]: Leaving directory `/home/travis/build/cn-uofbasel/ccn-lite/src/util'
make[1]: Leaving directory `/home/travis/build/cn-uofbasel/ccn-lite/src'
$ make -j32 -k ccn-lite-relay
*** Configuring for Linux ***
make[1]: Entering directory `/home/travis/build/cn-uofbasel/ccn-lite/src'
gcc -o ccn-lite-relay -Wall -Werror -std=c99 -g -pedantic -O0 -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -Dlinux ccn-lite-relay.c -lcrypto -lrt
In file included from ccn-lite-relay.c:76:0:
ccnl-core.c: In function ‘ccnl_content_serve_pending’:
ccnl-core.c:855:17: error: expected ‘)’ before ‘PRIi32’
ccnl-core.c:855:17: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format]
ccnl-core.c:855:17: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format]
ccnl-core.c:855:17: error: spurious trailing ‘%’ in format [-Werror=format]
In file included from ccnl-core.c:1055:0,
                 from ccn-lite-relay.c:76:
ccnl-core-fwd.c: In function ‘ccnl_fwd_handleInterest’:
ccnl-core-fwd.c:209:5: error: expected ‘)’ before ‘PRIi32’
ccnl-core-fwd.c:209:5: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format]
ccnl-core-fwd.c:209:5: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format]
ccnl-core-fwd.c:209:5: error: spurious trailing ‘%’ in format [-Werror=format]
cc1: all warnings being treated as errors
make[1]: *** [ccn-lite-relay] Error 1
make[1]: Leaving directory `/home/travis/build/cn-uofbasel/ccn-lite/src'
make: *** [bt-relay-nothing] Error 1

@OlegHahm
Copy link
Collaborator Author

Ah, okay, this has nothing to do with Arduino (or this PR). This problem has been introduced in #104 by @smlng.

@blacksheeep blacksheeep merged commit 414172f into cn-uofbasel:master Jan 27, 2017
@OlegHahm OlegHahm deleted the arduino_missing_include branch January 27, 2017 13:05
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.

'ssize_t' does not name a type in ccnl-core.h:148:5 - CCNLite-Arduino
3 participants