LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2011, 04:48 AM   #1
pradeeshnarayan
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: 0
Import error for ".so" module


I am new to linux. I want to make use of an ".so" module in my python programme. I have successfully installed the ".so" module by a setup file.
But when I try to import the ".so" module in my python programme I am getting an error like ImportError: /usr/local/lib64/python2.5/site-packages/_first.so: undefined symbol: __fread_chk.
I am working on opensuse server.
Please help me to solve this.
Please let me know if you require any further information.
 
Old 05-14-2011, 04:45 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,737

Rep: Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318Reputation: 3318
Welcome to LQ.

Which Suse version ? http://linuxsilo.net/docs/smart-questions_en.html

And the name of the installed "python module", please :
The package name, that provides "site-packages/_first.so"

Also : What is the output from the commands : 1) which python
2) python --version

..
 
Old 05-14-2011, 05:27 AM   #3
pradeeshnarayan
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: 0
which python
/usr/bin/python

python --version
python 2.5.1

opensuse version 10.3

i have a first_wrap.c file and i created a setup file as below.

#!/usr/bin/env python

"""
setup.py file for SWIG example
"""

from distutils.core import setup, Extension


first = Extension(
'_first',
sources = [
'first_wrap.c'
]
)

setup (name = 'first',
version = '0.1',
author = "Pradeesh",
description = """First programme""",
ext_modules = [first],
py_modules = ["firstastro","firstastroutils","firstswecls"],
)

i build and install this setup file and the _first.so got created.

Please let me know if you require any more information.

Last edited by pradeeshnarayan; 05-14-2011 at 07:26 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message "undefined symbol" when executing the command import from gasrine Linux - Software 1 11-23-2010 10:43 AM
What is the error "invalid module format" and "insert kernel module"? shayori Linux - Newbie 8 02-25-2010 04:48 AM
initrd error - "error inserting'/lib/uhci-hcd.ko' : -1 Unknown symbol in module" os.techie Fedora 2 02-04-2009 12:36 PM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration