| Summary: | libMonoPosixHelper.so wrong link reference in buildroot image | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Markus Egle <Markus.Egle> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | buildroot |
| Priority: | P5 | ||
| Version: | 2015.11 | ||
| Target Milestone: | 2016.02 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Ubuntu 15.10 | Target: | Intel Atom PC104 |
| Build: | |||
| Attachments: |
Archive with SimpleSerialPortOpen.exe
libmonoposixhelper location patch |
||
|
Description
Markus Egle
2016-02-04 13:15:13 UTC
Dear Markus Egle, It is probably reletad to this bug: https://bugzilla.xamarin.com/show_bug.cgi?id=24131 Try that workaround and report your results here. I'll look at this ASAP. Till now I'm not really familiar with the config/make procedure.
So I don't know if I have to change the Makefile.in or the config.in or both.
Found four possible locations to make the testing changes.
...> find /home/eglem/buildroot -name "*.in"|grep mono|awk '{print "grep -Hn libMonoPosixHelper " $1}'|sh|grep target
/home/eglem/buildroot/output/build/host-mono-4.0.2.5/runtime/Makefile.in:629: sed 's,target="$(prefix)/$(reloc_libdir)/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
/home/eglem/buildroot/output/build/host-mono-4.0.2.5/data/config.in:13: <dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
/home/eglem/buildroot/output/build/mono-4.0.2.5/runtime/Makefile.in:629: sed 's,target="$(prefix)/$(reloc_libdir)/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
/home/eglem/buildroot/output/build/mono-4.0.2.5/data/config.in:13: <dllmap dll="MonoPosixHelper" target="@prefix@/@reloc_libdir@/libMonoPosixHelper@libsuffix@" os="!windows" />
Then I just remove the prefix?
Dear Markus Egle, Could you try to have a look at file /etc/mono/config in your generated image? The config file on the target shows this wrong path to the lib. grep home /etc/mono/config <dllmap dll="MonoPosixHelper" target="/home/userX/buildroot/output/host/usr/lib/libMonoPosixHelper.so" os="!windows" /> Great! Change that line and it should work. Now we should understand where that file is generated that way ... Crosschecked it... - corrected ./buildroot/output/target/etc/mono/config - removed the libMonoPosixHelper.so copy to home folder... at startup And it works. Thanks. Dear Markus Egle, Could you send a minimal example that triggers the bug? Thank you! Created attachment 6331 [details]
Archive with SimpleSerialPortOpen.exe
SerialPort sp = new SerialPort("/dev/ttyS0", 19200);
try
{
sp.Open();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
creates the error that libMonoPosixHelper.so couldn't be found.
Created attachment 6336 [details]
libmonoposixhelper location patch
Dear Markus Egle,
Could you try the attached patch?
Simply drop it into package/mono folder and rebuild mono.
Thanks!
Fixed.
Applied patch with copying to buildroot/package/mono
After
> make clean
> make
buildroot/output/target/etc/mono/config shows the correct path for libMonoPosixHelper.so without any prefix and accordingly bzImage works as expected.
Thanks
Markus
Reopening the bug, since the patch proposed by Angelo has not been submitted/applied in Buildroot. Angelo, can you submit your patch? (In reply to Thomas Petazzoni from comment #11) Of Course, I'll submit a patch soon. Sincerely, angelo 9cc9c224f9675d1e724974a0915093e55519db8b has been committed. |