LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Newt not working in Slackware 14 64 bit, works on 32 bit (https://www.linuxquestions.org/questions/slackware-14/newt-not-working-in-slackware-14-64-bit-works-on-32-bit-4175430675/)

TobiSGD 10-05-2012 08:44 AM

Newt not working in Slackware 14 64 bit, works on 32 bit
 
I want to use Newt as UI for one of my projects. So I used sbopkg to install it and it works fine on my 32 bit system. now I wanted to continue development on my 64 bit system, the installation of newt worked without any errors, but when I try to start the example programs peanuts.py or popcorn.py I get an ImportError:
Code:

tobi ~ ☺ $ python peanuts.py
Traceback (most recent call last):
  File "peanuts.py", line 5, in <module>
    from snack import *
  File "/usr/lib64/python2.7/site-packages/snack.py", line 42, in <module>
    import _snack
ImportError: No module named _snack

While searching for a solution on the net I came across this thread, in which it is stated that version 0.52.13 is broken. So I used the SlackBuild to install the newest version 0.52.14, but the problem persists.

Sadly, I have no idea how to debug this, so any ideas are welcome.

ponce 10-05-2012 08:48 AM

seeing the error message, seems you are missing snack.

ruario 10-05-2012 08:52 AM

Yeah that problem is different but don't use 0.52.13 in any case. It really is broken (that bug report was filed by Alexey Feldgendler, who was an Opera employee at the time). I never got a response from the SlackBuild maintainer and I see now that SlackBuilds is still offering the broken version. :(

As a side note: Newt 0.52.13 was a problem for Opera because we use it (if available) in the install script we provide with our cross-distro packages. Opera worked around the issue now by checking the newt version and blacklisting 0.52.13.

TobiSGD 10-05-2012 09:07 AM

Quote:

Originally Posted by ponce (Post 4798016)
seeing the error message, seems you are missing snack.

You are right, I don't have snack installed, neither on the 32 bit system, where it works, nor on the 64 bit system, where it doesn't work.
So I installed snack and to be sure rebuilt the newt package, but that doesn't solve the problem.

ponce 10-05-2012 09:11 AM

and you got the same error?

TobiSGD 10-05-2012 09:20 AM

Exactly the same:
Code:

Traceback (most recent call last):
  File "/home/tobi/peanuts.py", line 5, in <module>
    from snack import *
  File "/usr/lib64/python2.7/site-packages/snack.py", line 42, in <module>
    import _snack
ImportError: No module named _snack


ponce 10-05-2012 09:37 AM

ok, I understood what's happening: reading the build log, seems newt builds itself a python snackmodule, but doing so it ignores the CFLAGS; on x86_64 it's a problem because at least -fPIC seems to be mandatory in this case
I updated the build script for 0.52.14 and added a sed that should fix it, if you want to test it and report back, I'll include the fix in my branch on slackbuilds.org

http://ponce.cc/slackware/testing/newt/

(and so maybe the snack package shouldn't be needed at all)

TobiSGD 10-05-2012 09:43 AM

Tested and working.

Once again I have to thank you for your effort to help me with my issues.

By the way, as I just found out the snack SlackBuild you referred to is for a sound library for Tcl.

ponce 10-05-2012 09:43 AM

ops :D

thanks to you for reporting the problem (so other users can benefit from the fixed package ;) ).


All times are GMT -5. The time now is 12:15 PM.