LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-08-2012, 07:16 AM   #1
Fedoran
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 4

Rep: Reputation: Disabled
Segfault during make libgraph(graphics.h) Debian


I'm trying to install the graphics.h lib on linux however I'm getting a segmentation fault during make.

Tried both versions from
http://download.savannah.gnu.org/releases/libgraph/

./configure goes well...

but make returns

Segmentation fault

All dmesg returns is
Code:
[ 2768.637077] make[6795]: segfault at dc0000 ip 0000000000dc0000 sp 00007fff3da40988 error 14

Tried following some tut
Did a core dump...
ulimit -c 1024

Then I did gdb make ./core

Code:
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<>...http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/make...done.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Core was generated by `make ./core'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000f20000 in ?? ()
(gdb) q
Not sure if make is valid here since it's a script


Googled much...

Any ideas on how to find the component causing the Segfault?
 
Old 08-08-2012, 06:08 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927Reputation: 927
Hi, welcome to LQ!

I'm afraid isolating the component causing this will navigate us
away from this being a Linux question. Considering the random
tools and/or locations you're seeing problems with segfaults in
it's most likely a) a bad RAM chip, or b) a dying memory controller
on your motherboard.

Unless of course your tool-chain is all home-brew rather than supplied
by your distro. But surely you would have mentioned that ...


Cheers,
Tink
 
Old 08-09-2012, 04:24 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,484

Rep: Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633
#2

Agreed ..
Libgraph (-1.0.2) will compile OK with any default gcc, versions 3.3.6 .. 4.7.1.
 
Old 08-09-2012, 08:25 AM   #4
Fedoran
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you very much for your replies.

Guess component wasn't the right word here.
What i meant was what part of the code.

I'd be rather astound if it was caused by dying hardware.

I'm not having any trouble running any programs.
Everything else compiles well, also make does work for other programs.
Compiling anything with Code::Blocks works smoothly as well.


Just checked the version I have -->gcc (Debian 4.4.5-8) 4.4.5
But I don't think it's the compiler either.


Just to recap what I did
I'm new to the matter maybe I did something wrong
Code:
1)downloaded the tar
2) created a directory in my home folder 
3)extracted libgraph-1.0.2 using tar -xvzf 
4)typed ./configure
makefile was created
5)typed make 
Result Segfault
What exactly does make do here?
From what I understood
linux doesn't know how to display the functions in graphics.h
It needs to do so using SDL
So libgraph configures the system to use SDL to display the graphics.h functions.

make takes a file replaces some parts of it and re-compiles it?
or the output of make handles the displaying of graphics using SDL.?


Could it some library libgraph depends on that is causing the trouble?
 
Old 08-09-2012, 10:33 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,484

Rep: Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633
Debian Squeeze.

Prerequisites, libgraph : # apt-get install \
gcc g++ libsdl1.2-dev libsdl-image1.2-dev libjpeg62-dev libpng12-dev guile-1.8-dev

The above command will also update the packages to the latest available versions.

.
 
Old 08-09-2012, 11:36 AM   #6
Fedoran
LQ Newbie
 
Registered: Aug 2012
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks,but everything is up to date

Code:
> gcc g++ libsdl1.2-dev libsdl-image1.2-dev libjpeg62-dev libpng12-dev guile-1.8-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version.
gcc set to manually installed.
g++ is already the newest version.
g++ set to manually installed.
libjpeg62-dev is already the newest version.
libjpeg62-dev set to manually installed.
libsdl1.2-dev is already the newest version.
guile-1.8-dev is already the newest version.
libpng12-dev is already the newest version.
libpng12-dev set to manually installed.
libsdl-image1.2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

I've managed to get GLUT working

Should be able to do what I want as well, even tho it seems a lot more complicated.

I've written a program in C which outputs a set of points.
And was looking for some easy cross-platform way to display that set of points on a x y axis
like this
http://www.ats.ucla.edu/stat/sas/teach/grlog/graph.gif

I'd like to embed it in a gui afterwards
Like this
http://alibad.files.wordpress.com/20...w_template.jpg
Can't be too hard to do that can it

I thought graphics.h would be suited for that
Been reading around a bit today and some people say that it's outdated anyways.


Too bad I wasn't able to understand what caused the Segfault.

Anyways thanks for the help guys Linux is still is new territory for me, I hope to get it under my belt someday ^^

Last edited by Fedoran; 08-09-2012 at 11:45 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
debian saned segfault jmoschetti45 Linux - Software 1 06-04-2012 08:01 AM
LFS 6.8 step 5.14 - Ncurses segfault on 'make' oldcripple Linux From Scratch 1 08-10-2011 05:50 PM
tcsh segfault, Debian squeeze kaz2100 Debian 2 10-01-2009 07:21 AM
how to make a graphics cluster using linux and windows hrishikesh_pb Linux - Software 4 06-07-2006 12:04 PM
Just wondering if you can make graphics and similiar with C .. purpleburple Programming 4 10-01-2002 10:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:40 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
Open Source Consulting | Domain Registration