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

Use liblockdev to lock serial line. #64

Closed
wants to merge 1 commit into from

Conversation

mnlipp
Copy link
Contributor

@mnlipp mnlipp commented Jan 18, 2016

This should implement #60.

As already outlined there, using liblockdev can simply be activated with the appropriate define.
This commit also includes updates to make cross compilation for ARM
work.

The committed native libs are up to date and have been tested for x86_64 and ARM.

Using liblockdev can simply be activated with the appropriate define.
This commit also includes updates to make cross compilation for ARM
work.

The native libs are up to date and have been tested for x86_64 and ARM.
@MrDOS
Copy link
Contributor

MrDOS commented Jan 18, 2016

Thanks for this. I'm sorry I didn't get around to commenting on the other issue before you made the builds – I could have saved you some effort. In order to maximize binary compatibility, I can compile the ARMv5 natives on a machine running glibc 2.7 and the i386/amd64 natives under glibc 2.5 if you remove those from the pull request. Just for records-keeping sake, under what environment were the ARMv6/v7 binaries compiled?

Can you explain the presence of src/main/c/cross-compile-libs/ARM/liblockdev.so.1? This looks like a system library. Do we need to have it in the repo?

@mnlipp
Copy link
Contributor Author

mnlipp commented Jan 18, 2016

Sorry, but I don't know how to remove something from a pull request. Wouldn't the normal procedure be to merge without commit, replace anything you don't want from my pull request and commit then?

Binaries were compiled with gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu1) (both x86_64 and the ARM binaries).

The library src/main/c/cross-compile-libs/ARM/liblockdev.so.1 is needed for cross-compilation. If you want to compile a shared library that references another shared library, the referenced library must be available to the linker to enable it to find out which symbols the shared library provides. There is no need for that library to be up-to-date, only the API version must match (.1 in our case), i.e. it must provide the correct symbols (but it could be a file with stubs). Assuming that you compile on a x86_64 system, the "native" liblockdev1 (Ubuntu) should obviously be installed, the 32bit version is supported by the multiarch configuration and can be installed as well, but people tend to warn you about "MultiarchCross" setups, so you shouldn't try to install liblockdev1:armv7 (or whatever it is called in Ubuntu) on your build host. To support cross-compilation "out-of-the-box" (provided you have arm-linux-gnueabi-gcc/++ installed) I have added the ARM version of liblockdev to the project.

@madhephaestus
Copy link
Member

To remove files from a pull request, just roll back the commit in your core repo where the files were added and force push the new state of the repo to your fork. Once your fork is right, make a new pull request like you did with this one.

Thank you for helping out with this!

@mnlipp
Copy link
Contributor Author

mnlipp commented Jan 18, 2016

Okay, this is the new pull request: #65.

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.

None yet

3 participants