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

Compilation of ir fails because of wrong LDFLAGS and/or LIBRARIES #19

Open
KlausMu opened this issue Dec 23, 2024 · 0 comments
Open

Compilation of ir fails because of wrong LDFLAGS and/or LIBRARIES #19

KlausMu opened this issue Dec 23, 2024 · 0 comments

Comments

@KlausMu
Copy link

KlausMu commented Dec 23, 2024

cd ir
make HOSTOS=LINUX

gives

[LINK]          ir
/usr/bin/ld: ../libs/Linux_x86_64/libflirc.a(hid.o): in function `hid_send_packet':
/home/kotzin/.buildkite-agent/builds/Linux-1/flirc-inc/sw-main/lib/libtransport/hid.c:144: undefined reference to `hid_write'
/usr/bin/ld: /home/kotzin/.buildkite-agent/builds/Linux-1/flirc-inc/sw-main/lib/libtransport/hid.c:150: undefined reference to `hid_error'
...

I think this is because of wrong LDFLAGS and/or LIBRARIES.

Don't know exactly where to fix this in Makefile or cross.mk

What is being called is

cc main.c -o ir -L. -Wl,--start-group -lhidapi-hidraw -lusb-1.0 -Wl,--end-group -lusb-1.0 -lflirc -lir -L../libs/Linux_x86_64 -Wall -g -std=c99 -I. -I../libs/include -Ideps/include

What should be called is

cc main.c -o ir -L. -Wl,--start-group -lhidapi-hidraw -lusb-1.0 -lusb-1.0 -lflirc -lir -Wl,--end-group -L../libs/Linux_x86_64 -Wall -g -std=c99 -I. -I../libs/include -Ideps/include

So the --start-group --end-group is wrong and needs to include all libs.
And -lusb-1.0 is used twice.

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

No branches or pull requests

1 participant