-
Notifications
You must be signed in to change notification settings - Fork 2k
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
pkg: libcoap is partially broken and outdated #7737
Comments
I gave a quick try for this issue and, though I have problems, those are not related to what is described here but: BOARD=pba-d-01-kw2x make
Warning: no PORT set!
Building application "tests_pkg_libcoap" for "pba-d-01-kw2x" with MCU "kinetis".
rm -Rf /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap
mkdir -p /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap
/Users/facosta/git/RIOT2/RIOT/dist/tools/git/git-cache clone "https://github.com/obgm/libcoap" "ef41ce5d02d64cec0751882ae8fd95f6c32bc018" "/Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap"
Cloning into '/Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap'...
remote: Counting objects: 5441, done.
remote: Total 5441 (delta 0), reused 0 (delta 0), pack-reused 5441
Receiving objects: 100% (5441/5441), 1.97 MiB | 1.23 MiB/s, done.
Resolving deltas: 100% (3828/3828), done.
HEAD is now at ef41ce5... improved install target
touch /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap/.git-downloaded
git -C /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap checkout -f ef41ce5d02d64cec0751882ae8fd95f6c32bc018
HEAD is now at ef41ce5... improved install target
git -C /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap am --ignore-whitespace "/Users/facosta/git/RIOT2/RIOT/pkg/libcoap"/patches/*.patch
Applying: Add RIOT Makefile
Applying: Add config.h
Applying: Remove two example programs in root
Applying: Eliminate some compiler warnings and errors
error: patch failed: net.h:132
error: net.h: patch does not apply
Patch failed at 0004 Eliminate some compiler warnings and errors
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
make[1]: *** [/Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap/.git-patched] Error 128
make: [pkg-prepare] Error 2 (ignored)
"/Applications/Xcode.app/Contents/Developer/usr/bin/make" -C /Users/facosta/git/RIOT2/RIOT/pkg/libcoap
git -C /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap checkout -f ef41ce5d02d64cec0751882ae8fd95f6c32bc018
Warning: you are leaving 3 commits behind, not connected to
any of your branches:
5d0a745 Remove two example programs in root
8824a21 Add config.h
42405b4 Add RIOT Makefile
If you want to keep them by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 5d0a745
HEAD is now at ef41ce5... improved install target
git -C /Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap am --ignore-whitespace "/Users/facosta/git/RIOT2/RIOT/pkg/libcoap"/patches/*.patch
fatal: previous rebase directory .git/rebase-apply still exists but mbox given.
make[1]: *** [/Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pkg/pba-d-01-kw2x/libcoap/.git-patched] Error 128
make: *** [/Users/facosta/git/RIOT2/RIOT/tests/pkg_libcoap/bin/pba-d-01-kw2x/libcoap.a] Error 2 Is actually libcoap still supported? |
@nmeum thanks for the hint! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Can someone confirm that this was fixed in #8396? |
|
libcoap has evolved quite a bit since the current version that is used in RIOT (https://github.com/obgm/libcoap/tree/ef41ce5d02d64cec0751882ae8fd95f6c32bc018, this commit is from 2014!). The latest release of libcoap is from 2019. Is there someone willing to work on an update ? @chrysn (I see that you are one of the contributors ;) ) ? |
With #12975 now merged this should also be a lot easier (from my experience way back when). But maybe it can also be ported with just using |
I wrote an application for the RIOT board
pba-d-01-kw2x
which makes use of thelibcoap
pkg. The application compiles fine onnative
but when I compile it withBOARD=pba-d-01-kw2x
the following error shows up:This error seems to be caused by the fact that
#define HAVE_SYS_TIME_H 1
in set inconfig.h
butgettimeofday(3)
is not defined in that header for this platform. If you remove that macro fromconfig.h
and recompile the application the error message changes to the following:The clock is needed for the macro
coap_ticks
which could trivially be implemented usingxtimer
, however, when doing so and addingUSEMODULE += xtimer
to the application Makefile the error message changes to the following:There seems to be name clash with the linked list implementation used by libcoap and the one from
list.h
required by xtimer. This issue could be fixed by upgrading the bundled libcoap to 4.1.2. Doing so would probably require an update of RIOTsposix_sockets
module since libcoap 4.1.2 makes extensive use ofsetsockopt(3)
with options that are not supported by RIOT currently.The text was updated successfully, but these errors were encountered: