FS#34201 - [erlang] can not find wxe_driver.so, some graphical tools don't work

Attached to Project: Community Packages
Opened by Ruud (Moving_away) - Thursday, 07 March 2013, 15:32 GMT
Last edited by Alexander F. Rødseth (xyproto) - Wednesday, 27 March 2013, 16:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Alexander F. Rødseth (xyproto)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
When trying to use some of the graphical tools/ demo-applications in Erlang, it gives the following error-message:
ERROR: Could not find 'wxe_driver.so' in /usr/lib/erlang/lib/wx-1.0/priv
and the screen that appears is not complete (missing information).

Folder 'priv' does not exist at that location, and the file 'wxe_driver.so' does not exist anywhere else in the system.
https://bbs.archlinux.org/viewtopic.php?id=159183 mentiones the same issue.
Issue has happened both in Arch ( FS#15024 ) and other distro's in the past.

Additional info:
* Packages:
-erlang R16B-1 (x86_64)
-wxgtk 2.8.12.1 (x86_64)
* Up-to-date system, newly installed,


Steps to reproduce:
In the terminal open erlang-shell:
$ erl
Try one of the following commands in this shell:
1> debugger:start().
or
1> wx:demo().


The following graphical tools do not seem to be influenced:
pman:start().
tv:start().
appmon:start().

This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Wednesday, 27 March 2013, 16:05 GMT
Reason for closing:  Fixed
Comment by Alexander F. Rødseth (xyproto) - Friday, 08 March 2013, 19:58 GMT
Confirmed, able to reproduce. Thanks for reporting.

I tried ading 'wxgtk' to make dependencies, just in case, but the result was the same.

Judging from earlier bugreports, it's highly likely that it's an upstream bug this time as well.

Please report upstream and include a link to the bug report here.

Thank you.
Comment by Ruud (Moving_away) - Saturday, 09 March 2013, 04:13 GMT
You're welcome.

I had a look at their bugs mailing-list (forgot to do so before), http://erlang.org/pipermail/erlang-bugs/2013-February/003384.html seems relevant. It describes the same problem, only in R16A (erlang's testing release as far as I understand). They mention a patch, but I guess that should have made it into R16B then. I don't have enough experience building packages yet to poke around in it myself I'm afraid (still learning the basics).
Comment by Alexander F. Rødseth (xyproto) - Sunday, 10 March 2013, 11:53 GMT
Ok, they are probably on it, then. I bet they will make a new release soon.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 10 March 2013, 23:25 GMT
Seems like they have found a working patch for the issue:
http://erlang.org/pipermail/erlang-bugs/2013-February/003428.html

Awaiting the next release. I will consider applying the patch as well.
Comment by Ruud (Moving_away) - Tuesday, 12 March 2013, 01:39 GMT
Ok, thanks. I'll look forward to either and will report back whether they work as soon as they're out.
Comment by Ruud (Moving_away) - Friday, 15 March 2013, 14:39 GMT
Follow-up:
I just now mentioned the issue in the #erlang channel on freenode. A fellow Archer (essen) over there tried to compile the package and was not able to do so, using the current PKGBUILD for erlang. When compiling it says it fails on src/otp_src_R16B/lib/wx/c_src/gen/wxe_funcs.cpp (g++ internal compilation error). It also gives the following error for this before failing the compilation:

78830: Warning: end of file not at end of line; newline inserted
71949: Error: unknown pseudo-op:`.str'

When I mentioned the idea was to wait for the next release, he said that that would mean waiting for 3 months and not no clue whether it will be fixed by then.

Comment by Alexander F. Rødseth (xyproto) - Friday, 15 March 2013, 17:56 GMT
Sounds to me like he ran out of memory when compiling with g++. It compiled fine here when I created the package, which is not many days ago. I can double-check if it still compiles, though.

Try compiling the package again on a computer with more available memory.
Comment by Ruud (Moving_away) - Saturday, 16 March 2013, 03:24 GMT
Just had a go at compiling it from ABS myself. Used 'makepkg -s', it needed to install 2 extra dependencies (lksctp-tools and unixodbc), which are apparently only needed for building, since they show up as orphan packages using 'pacman -Qdt'. Build succeeds, creates the erlang-R16B-1 and erlang-unixodbc-R16B-1 packages. Before installing, I confirmed the bug was still there, removed erlang with 'pacman -Rsn erlang' to make sure I start out clean (which only removed the erlang package). After installing the ABS build package (only the erlang one, not erlang-odbc), both failing functions work. So apparently when building for the repo's something didn't go the same as with this ABS build. This is also confirmed by the fact that the package has a slightly different size (installed size repos:115.36MiB, ABS build: 117.16MiB).
By the way, the build indeed took significantly more memory when compiling the wxe_funcs.cpp than other parts of the build (from 360M to 1250M), so maybe that was indeed why essen on IRC had trouble building it.
So now we need to find out where the difference is between my build and the standard one.
Comment by Alexander F. Rødseth (xyproto) - Saturday, 16 March 2013, 14:19 GMT
Neither unixodbc nor lksctp-tools are orphans (but they are make dependencies):

https://www.archlinux.org/packages/extra/x86_64/unixodbc/
https://www.archlinux.org/packages/community/x86_64/lksctp-tools/

Did you try building in a chroot?

Just tried building it again, and it built fine here.

This problem is not a packaging problem. It's a problem with Erlang (a regression even) that the upstream developers should solve.
Comment by Ruud (Moving_away) - Saturday, 16 March 2013, 15:54 GMT
I guess we misunderstand eachother, probably because I expressed myself not clearly enough. Let me try to explain.

* I build the package using ABS (updated ABS, copied the folder for erlang, execute 'makepkg -s'). this seemed to finish successfully.

* As part of this, lksctp-tools and unixodbc are downloaded. I called these orphans, I meant they are not a dependancy to run, but apparently a dependancy to build the package (in other words, when I run 'pacman -Qdt' these 2 packages show up because they are not a dependancy of anything). Not really important, the only reason I mentioned this was to give full report of what I did

* After just building the package (so not installing it yet), I tested whether the bug was there (since lksctp-tools and unixodbc were added and I didn't understand the concept of build-dependency enough). Naturally, it was.

* I uninstalled the erlang I got from the repos (using 'pacman -Rsn'), and installed the newly build package. As a sidenote, I noticed that there was a slight difference in size between my newly build package and the package from the repos (mine being slightly bigger).

* After installing the package, I tested whether I still had the problems, and I did not. The problem was solved. So building it from ABS myself created a working package, solving the bug.

My point was that there apparently is a difference in the build made for the repos, and the build I did from ABS, and that finding out what that was would make it possible to rebuild the package in the repos so it works out of the box. One thing I could think of myself was actually having wxgtk installed, but you said you tried to build it before with wxgtk as make-depend and it didn't solve it. I attached a list of all installed packages so you can see in what environment it was build. If you need other info, let me know.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 17 March 2013, 10:54 GMT
Thank you for clarifying.

The package built from ABS and the package from [community] can differ in size from a number of different reasons. Different system-wide compile flags, different versions of compilers at the time of building, etc. The case of Erlang is a bit special, since it builds differently depending on which libraries are available at compile-time, so this may be the case too, if I should have missed one of the make dependencies (or included one too many). I see that wxgtk is only a dependency and not a make dependency. I'll try adding it as a make dependency and build the package again.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 17 March 2013, 11:20 GMT
Updated the erlang package. I don't get the error message any more. does it work for you now?
Comment by Ruud (Moving_away) - Sunday, 17 March 2013, 15:32 GMT
No, I'm sorry to say it doesn't solve it for me. I get the same error that we started out with (wxe_driver.so missing). I think the wx stuff does not get included for some odd reason. When I have time I'll have a look whether the new PKGBUILD works when build locally.
Comment by Alexander F. Rødseth (xyproto) - Monday, 18 March 2013, 00:59 GMT
Ok, thanks for testing.
Comment by Ruud (Moving_away) - Monday, 18 March 2013, 12:23 GMT
Build the package just now, and the result is the same as before: package from repos doesn't work, ABS build package works. For your reference I included a transcript of the build (probably you don't want to watch the whole thing, but the configure in the beginning might give you some clues with regards to the differences). At the end of that file I also tried to run debugger:start(), both in the repo version and after installing the own build. Hope it helps.

P.s. sorry for the garbled look in the file, but script apparently outputs all control characters.
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 19 March 2013, 11:00 GMT
Thank you, I'll look at it some more and try to figure out why this is.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 27 March 2013, 13:51 GMT
Hi, does it make any difference if you have wxgtk2.9 from [community] installed or not? Do you have any packages that could be wx-related installed that you suspect just maybe make a difference when compiling? Thanks.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 27 March 2013, 15:43 GMT
Added both wxgtk and wxgtk2.9 as dependencies and now it works here. When adding only wxgtk or wxgtk2.9 as dependencies, it didn't work.

It's probably possible to change the PKGBUILD to only require one of them, by configuring the erlang build process somehow.

Updating the package, it should appear in [community] shortly. Thanks for the help, Ruud.

Loading...