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

[question] Linux x86-64 binary linked against lockdev/liblockdev #217

Open
splatch opened this issue May 20, 2021 · 1 comment
Open

[question] Linux x86-64 binary linked against lockdev/liblockdev #217

splatch opened this issue May 20, 2021 · 1 comment

Comments

@splatch
Copy link

splatch commented May 20, 2021

Hey,
I am running two kinds of linux machines - one is my developer box powered by arch, another is embedded linux distro made with yocto. In both cases I ran into issues with locks. At least for arch lock dir (/var/run/lock) does exist, permissions are fine for all software but not for rxtx/nrjavaserial.

I started to look at never ending topic of locks #60 and some other issues. I would love to see issue fixed since my embedded linux is also x86-64. How to get make linux64 produce binary linked against lockdev?

@MrDOS
Copy link
Contributor

MrDOS commented May 21, 2021

If you're comfortable building your own native binaries, probably the easiest workaround to locking issues at the moment is to build with DISABLE_LOCKFILES defined – edit src/main/c/Makefile and add -DDISABLE_LOCKFILES to the CFLAGS definition:

diff --git a/src/main/c/Makefile b/src/main/c/Makefile
index 90d43bd..3ff9359 100644
--- a/src/main/c/Makefile
+++ b/src/main/c/Makefile
@@ -63,7 +63,8 @@ include platform.mk
 # it will work as a library (dlopen(3) et al. can load it into any memory).
 export CFLAGS ?= -I$(JAVA_HOME)/include -I./include -I./include/target \
                    -O3 -fPIC -c \
-                   -Wall
+                   -Wall \
+                   -DDISABLE_LOCKFILES
 # We want to use the compiler frontend to invoke the linker, too.
 export LD = $(CC)
 # We want to link objects into a shared library.

Then you can make clean-linux64 linux64.

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

2 participants