LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 03: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, 03:45 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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, 04: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 06:26 AM.
 
  


Reply



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 09:43 AM
What is the error "invalid module format" and "insert kernel module"? shayori Linux - Newbie 8 02-25-2010 03:48 AM
initrd error - "error inserting'/lib/uhci-hcd.ko' : -1 Unknown symbol in module" os.techie Fedora 2 02-04-2009 11:36 AM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 01:57 PM

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

All times are GMT -5. The time now is 01:36 PM.

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
Open Source Consulting | Domain Registration