How do I use graphics.h in Ubuntu 18.04? I am getting the following error message when trying to follow the instructions in this answer to compile and install libgraph in order to use graphics.h on Ubuntu.
$ sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8
> guile-1.8-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev
> libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev
> libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev
> libslang2-dev libasound2 libasound2-dev
[sudo] password for linux:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package guile-1.8
E: Couldn't find any package by glob 'guile-1.8'
E: Couldn't find any package by regex 'guile-1.8'
E: Unable to locate package guile-1.8-dev
E: Couldn't find any package by glob 'guile-1.8-dev'
E: Couldn't find any package by regex 'guile-1.8-dev'
E: Unable to locate package libesd0-dev
karel
107k93 gold badges263 silver badges290 bronze badges
asked Jun 2, 2018 at 8:08
2
Three of the packages in the command in your question that returned an error message have been updated in 18.04. In the «Install some additional packages» step in this answer open the terminal and type:
sudo apt install libsdl-image1.2 libsdl-image1.2-dev guile-2.0
guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev
pulseaudio-esound-compat libdirectfb-dev libdirectfb-extra libfreetype6-dev
libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev
libslang2-dev libasound2 libasound2-dev
To make it easier to copy/paste it in the terminal here is the previous command reformatted as a single line:
sudo apt install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev pulseaudio-esound-compat libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev
answered Jun 2, 2018 at 11:17
karelkarel
107k93 gold badges263 silver badges290 bronze badges
2
I want to make it clear that I know there are better ways to write graphics programs but our teacher is using turbo c++ program on windows with graphics.h header file.
As I am using Linux kali distro, I wanted an optimum solution to run C programs with graphics.h header file. problem is graphics.h is not the part of the standard GCC library.
now there are multiple approaches to solve this issue:
- installing turbo c++ and DOSBox
- adding “graphics.h” C/C++ library to GCC compiler in Linux
- downloading a compiler which has graphics.h library.
(i don’t know how much of it makes sense but I wrote what I wrote according to my basic understanding.)
now let’s get to solutions,
I didn’t try the first one. I wanted a more optimum solution if there’s one. you can describe all of the solutions so I can have a better understanding of this one.
the second solution is to get dependencies and necessary packages. for this, I looked into this article:
How to add “graphics.h” C/C++ library to gcc compiler in Linux
it was 4 step process:
-
Get build-essentials. done.
sudo apt-get install build-essential -
Additional packages. partially done.
sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev
the command above gives the following error:
E: unable to locate package libesd0-dev
so here I can either find the package by adding some repository in source list but I don’t want to break my system. I can find the package online somehow but I don’t know where I should place the files. Also, it brings me to the question where did the above packages got installed?
- download and install libgraph-1.0.2.tar.gz file partially done
I downloaded the file, extracted it. ran command ./configure
and then when I ran make it gave me the following output on the terminal. (i want to give you the insights but it gave 1 fatal error if you ignore the warnings. )
guile-libgraph.c:25:10 fatal error: libguile.h: no file or directory found.
link of Pastebin below:
make command output
I tried other solutions such as the one suggested on this link:
Trying to install libgraph
the best solution mentioned:
using the alternative method,
the output I got was:
make command output
no errors and just warning so I moved forward with make install command. I got the following errors as output:
finally, make install
As u can see I am stuck. thanks for reading. please help.
the main objective is to run C programs with graphics.h on Linux kali.
I’m trying to install the radare2-bindings for Python (http://www.radare.org/r/down.html).
After cloning the project from github and running ./configure —prefix=/usr, everything seems ok python-wide on the output (errors are from languages I won’t need bindings to).
==> Using valabind 0.9.2--1-g7281165
==> Using swig 2.0.11
Checking valabind languages support...
- python: cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
yes
- perl: yes
- ruby: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from -e:1:in `<main>'
test_wrap.c:821:18: fatal error: ruby.h: No such file or directory
#include <ruby.h>
^
compilation terminated.
no
- lua: test_wrap.c:709:17: fatal error: lua.h: No such file or directory
#include "lua.h"
^
compilation terminated.
no
- go: SWIG -go: -intgosize option required but not specified
no
- java: test_wrap.c:135:17: fatal error: jni.h: No such file or directory
#include <jni.h>
^
compilation terminated.
no
- guile: test_wrap.cxx:730:22: fatal error: libguile.h: No such file or directory
#include <libguile.h>
^
compilation terminated.
no
- php5: test_wrap.c:706:18: fatal error: zend.h: No such file or directory
#include "zend.h"
^
compilation terminated.
no
- node-ffi: no
- ctypes: yes
- ocaml: SWIG is buggy. Please set in ocamldec.swg the following line:
#define caml_array_length swig_caml_array_length
/usr/bin/valabind-cc: 1: /usr/bin/valabind-cc: ocamlc: not found
test_wrap.cxx:741:24: fatal error: caml/alloc.h: No such file or directory
#include <caml/alloc.h>
^
compilation terminated.
no
- cxx: yes (g++)
- valac: yes
Supported langs:
- ctypes
- cxx
- duktape
- perl
- python
- valac
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for working directories... current
using prefix '/usr'
checking for c compiler... gcc
checking for c++ compiler... g++
checking for valabind... /usr/bin/valabind
checking for swig... /usr/bin/swig
checking for g-ir-compiler... /usr/bin/g-ir-compiler
Using PKGCONFIG: pkg-config
checking pkg-config flags for r_core... yes
creating ./config.mk
cleaning temporally files... done
Final report:
- PREFIX = /usr
- HAVE_SWIG = 1
- HAVE_VALABIND = 1
- HAVE_GIRCOMPILER = 1
However, when I try to run make on the python folder, I get the following output:
Build r_core -lr_core -lr_config -lr_cons -lr_util -lr_flags -lr_asm -lr_db -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic
valabind-cc python r_core -NRadare -NSDB --swig -x --vapidir=../vapi ../vapi/r_core -I/usr/include/libr -lr_core -lr_config -lr_cons -lr_util -lr_flags -lr_asm -lr_db -lr_debug -lr_hash -lr_bin -lr_lang -lr_io -lr_anal -lr_parse -lr_bp -lr_egg -lr_reg -lr_search -lr_syscall -lr_socket -lr_fs -lr_magic
valabind --swig -I /usr/include/libr -x -N SDB -N Radare -x --vapidir ../vapi -o r_core.i -m r_core ../vapi/r_core --swig
NOTICE Symbol defined VALABIND_SWIG
NOTICE Adding dependency package glib-2.0
NOTICE Adding dependency package gobject-2.0
NOTICE Adding dependency package ../vapi/r_core
NOTICE Adding dependency package r_cmd
NOTICE Adding dependency package r_util
NOTICE Adding dependency package r_cons
NOTICE Adding dependency package r_anal
NOTICE Adding dependency package r_reg
NOTICE Adding dependency package r_hash
NOTICE Adding dependency package r_egg
NOTICE Adding dependency package r_asm
NOTICE Adding dependency package r_syscall
NOTICE Adding dependency package r_db
NOTICE Adding dependency package r_io
NOTICE Adding dependency package r_bp
NOTICE Adding dependency package r_debug
NOTICE Adding dependency package r_search
NOTICE Adding dependency package r_flags
NOTICE Adding dependency package r_config
NOTICE Adding dependency package r_bin
NOTICE Adding dependency package r_parse
NOTICE Adding dependency package r_lang
NOTICE Adding dependency package r_print
NOTICE Adding dependency package r_fs
NOTICE Adding dependency package r_magic
WARNING Method delete renamed to _delete (don't ask where)
WARNING Method continue renamed to cont (don't ask where)
swig -small -O -o r_core_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/libr -c++ -c++ -python r_core.i
r_core.i:40: Warning 302: Identifier 'RCoreAsmHitVector' redefined (ignored) (Renamed from 'vector< RCoreAsmHit >'),
r_core.i:39: Warning 302: previous definition of 'RCoreAsmHitVector' (Renamed from 'vector< RCoreAsmHit >').
r_core.i:42: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:46: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:47: Warning 302: Identifier 'RAnalRefVector' redefined (ignored) (Renamed from 'vector< RAnalRef >'),
r_core.i:41: Warning 302: previous definition of 'RAnalRefVector' (Renamed from 'vector< RAnalRef >').
r_core.i:62: Warning 302: Identifier 'charVector' redefined (ignored) (Renamed from 'vector< char >'),
r_core.i:58: Warning 302: previous definition of 'charVector' (Renamed from 'vector< char >').
r_core.i:63: Warning 302: Identifier 'charVector' redefined (ignored) (Renamed from 'vector< char >'),
r_core.i:58: Warning 302: previous definition of 'charVector' (Renamed from 'vector< char >').
r_core.i:92: Warning 314: 'print' is a python keyword, renaming to '_print'
r_core.i:322: Warning 314: 'from' is a python keyword, renaming to '_from'
r_core.i:327: Warning 314: 'from' is a python keyword, renaming to '_from'
r_core.i:584: Warning 314: 'import' is a python keyword, renaming to '_import'
r_core.i:1979: Warning 314: 'del' is a python keyword, renaming to '_del'
r_core.i:1655: Warning 453: Can't apply (RAsmOp *OUTPUT). No typemaps are defined.
r_core.i:1660: Warning 453: Can't apply (RAsmOp *OUTPUT). No typemaps are defined.
g++ -fPIC -shared r_core_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -D_FORTIFY_SOURCE=2 -g --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/include/libr -o _r_core.so -lr_magic -lr_fs -lr_socket -lr_syscall -lr_search -lr_reg -lr_egg -lr_bp -lr_parse -lr_anal -lr_io -lr_lang -lr_bin -lr_hash -lr_debug -lr_db -lr_asm -lr_flags -lr_util -lr_cons -lr_config -lr_core -L/usr/local/lib -L/usr/pkg/lib -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
r_core_wrap.cxx: In function 'void delete_RListIter(RListIter*)':
r_core_wrap.cxx:7324:25: warning: statement has no effect [-Wunused-value]
r_list_iter_free(self);
^
r_core_wrap.cxx: In function 'void RIO_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int, int)':
r_core_wrap.cxx:8266:57: error: too many arguments to function 'void r_io_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int)'
r_io_section_list_visual(self, addr, len, width, color);
^
In file included from /usr/include/libr/r_fs.h:6:0,
from r_core_wrap.cxx:3210:
/usr/include/libr/r_io.h:396:12: note: declared here
R_API void r_io_section_list_visual(RIO *io, ut64 seek, ut64 len, int color);
^
... r_core.so
Build r_bin -lr_bin -lr_util -lr_db -lr_io
valabind-cc python r_bin -NRadare -NSDB --swig -x --vapidir=../vapi ../vapi/r_bin -I/usr/include/libr -lr_bin -lr_util -lr_db -lr_io
valabind --swig -I /usr/include/libr -x -N SDB -N Radare -x --vapidir ../vapi -o r_bin.i -m r_bin ../vapi/r_bin --swig
NOTICE Symbol defined VALABIND_SWIG
NOTICE Adding dependency package glib-2.0
NOTICE Adding dependency package gobject-2.0
NOTICE Adding dependency package ../vapi/r_bin
NOTICE Adding dependency package r_util
NOTICE Adding dependency package r_io
swig -small -O -o r_bin_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/libr -c++ -c++ -python r_bin.i
r_bin.i:110: Warning 314: 'import' is a python keyword, renaming to '_import'
g++ -fPIC -shared r_bin_wrap.cxx -DG_BEGIN_DECLS -DG_END_DECLS -DG_GNUC_CONST -DSWIG_PYTHON_SILENT_MEMLEAK -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -D_FORTIFY_SOURCE=2 -g --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -O2 -Wall -Wstrict-prototypes -I/usr/include/libr -o _r_bin.so -lr_io -lr_db -lr_util -lr_bin -L/usr/local/lib -L/usr/pkg/lib -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++ [enabled by default]
r_bin_wrap.cxx: In function 'void delete_RListIter(RListIter*)':
r_bin_wrap.cxx:6034:25: warning: statement has no effect [-Wunused-value]
r_list_iter_free(self);
^
r_bin_wrap.cxx: In function 'void RIO_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int, int)':
r_bin_wrap.cxx:6271:57: error: too many arguments to function 'void r_io_section_list_visual(RIO*, long long unsigned int, long long unsigned int, int)'
r_io_section_list_visual(self, addr, len, width, color);
^
In file included from r_bin_wrap.cxx:3117:0:
/usr/include/libr/r_io.h:396:12: note: declared here
R_API void r_io_section_list_visual(RIO *io, ut64 seek, ut64 len, int color);
^
... r_bin.so
... r_asm.so
Does anyone know how to solve this? I’ve had a lot of problems during this installation already, and was able to solve them… but this one really got me stuck now.
- Forum
- The Ubuntu Forum Community
- Ubuntu Specialised Support
- Development & Programming
- Programming Talk
- Error while installing libgraph-1.0.2
-
Error while installing libgraph-1.0.2
Hi friends,
I am trying to install libgraph-1.0.2
After running ./configure command and then running make command, I got following error:Makefile:934: warning: overriding commands for target `libgraph.pc’
Makefile:409: warning: ignoring old commands for target `libgraph.pc’
if /bin/bash ./libtool —mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DFONTDIR=»»/usr/local/share/libgraph/Font/»» -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT guile-libgraph.lo -MD -MP -MF «.deps/guile-libgraph.Tpo» -c -o guile-libgraph.lo guile-libgraph.c;
then mv -f «.deps/guile-libgraph.Tpo» «.deps/guile-libgraph.Plo»; else rm -f «.deps/guile-libgraph.Tpo»; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DFONTDIR=»/usr/local/share/libgraph/Font/» -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT guile-libgraph.lo -MD -MP -MF .deps/guile-libgraph.Tpo -c guile-libgraph.c -fPIC -DPIC -o .libs/guile-libgraph.o
guile-libgraph.c:25:22: fatal error: libguile.h: No such file or directory
compilation terminated.
make[2]: *** [guile-libgraph.lo] Error 1
make[2]: Leaving directory `/home/rahul/Downloads/libgraph-1.0.2′
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rahul/Downloads/libgraph-1.0.2′
make: *** [all] Error 2Thereafter , I installed guile from Synaptic Package Manager, but still the same error is shown.
What should I do???Regards
-
Re: Error while installing libgraph-1.0.2
You need to install guile-dev. (In general, header files (.h) are provided by -dev packages.)
-
Re: Error while installing libgraph-1.0.2
@Bachstelze:
I have already installed guile-2.0-dev
Now, tell me what should I do….
-
Re: Error while installing libgraph-1.0.2
Hi Bachstelze,
I did the same but no effect took place.
So what should I do?Regards
-
Re: Error while installing libgraph-1.0.2
Which version of Ubuntu are you running?
-
Re: Error while installing libgraph-1.0.2
After installing guile-dev, did you rerun configure?
-
Re: Error while installing libgraph-1.0.2
Hi,
I am using ubuntu 12.04 LTE
-
Re: Error while installing libgraph-1.0.2
@spjackson:
Yes I reran the configure
-
Re: Error while installing libgraph-1.0.2
If you have installed the prerequisites properly, I am afraid I’ve no idea what your problem is.
I did a fresh install of 12.04
Code:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise
Installed the prerequisites thus
Code:
$ sudo apt-get install build-essential $ sudo apt-get install guile-1.8-dev $ sudo apt-get install libsdl1.2-dev $ sudo apt-get install libsdl-image1.2-dev
Checked I’d got libguile.h
Code:
$ find /usr/include -name "*guile*" /usr/include/libguile.h /usr/include/libguile /usr/include/guile
Yes, I have, so get the source and build it…
Code:
$ wget http://download.savannah.gnu.org/releases/libgraph/libgraph-1.0.2.tar.gz $ tar xf libgraph-1.0.2.tar.gz $ cd libgraph-1.0.2/ $ ./configure $ make
and it builds without error. What are you doing differently?
-
Re: Error while installing libgraph-1.0.2
@spjackson:
Thanks for the help. Now it has been installed
Actually I had installed guile-2.0.
So, I followed your steps again, and now it’s done.
Thank you.But, now while compiling a .cpp file for graphics I encountered the following error:
rahul@rahul-VPCEG28FN:~/CProgram/Graphics$ g++ aa.cpp -lgraph
/usr/bin/ld: error: cannot find -lgraph
/tmp/ccntOaHb.o:aa.cpp:function main: error: undefined reference to ‘initgraph’
/tmp/ccntOaHb.o:aa.cpp:function main: error: undefined reference to ‘line’
/tmp/ccntOaHb.o:aa.cpp:function main: error: undefined reference to ‘closegraph’
collect2: ld returned 1 exit statusPlease tell me where doing wrong…..
Thanks
Bookmarks
Bookmarks

Posting Permissions
Bug 590528
— dev-scheme/guile-2.0.12-r1: emake failed: ../libguile/instructions.h:30:34: fatal error: libguile/vm-i-system.i: No such file or directory
Summary:
dev-scheme/guile-2.0.12-r1: emake failed: ../libguile/instructions.h:30:34: f…
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Note |
Я пытаюсь установить libgraph библиотеку в Ubuntu 17.04. ./configure файл был успешен, но когда я сказал make это дает ошибку:
Makefile:934: warning: overriding recipe for target 'libgraph.pc'
Makefile:409: warning: ignoring old recipe for target 'libgraph.pc'
make all-recursive
make[1]: Entering directory '/home/maverick/libgraph-1.0.2'
Makefile:934: warning: overriding recipe for target 'libgraph.pc'
Makefile:409: warning: ignoring old recipe for target 'libgraph.pc'
Making all in doc
make[2]: Entering directory '/home/maverick/libgraph-1.0.2/doc'
Making all in man
make[3]: Entering directory '/home/maverick/libgraph-1.0.2/doc/man'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/maverick/libgraph-1.0.2/doc/man'
make[3]: Entering directory '/home/maverick/libgraph-1.0.2/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/maverick/libgraph-1.0.2/doc'
make[2]: Leaving directory '/home/maverick/libgraph-1.0.2/doc'
make[2]: Entering directory '/home/maverick/libgraph-1.0.2'
Makefile:934: warning: overriding recipe for target 'libgraph.pc'
Makefile:409: warning: ignoring old recipe for target 'libgraph.pc'
if /bin/bash ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DFONTDIR=""/usr /local/share/libgraph/Font/"" -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT guile-libgraph.lo -MD -MP -MF ".deps/guile-libgraph.Tpo" -c -o guile-libgraph.lo guile-libgraph.c;
then mv -f ".deps/guile-libgraph.Tpo" ".deps/guile-libgraph.Plo"; else rm -f ".deps/guile-libgraph.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DFONTDIR="/usr/local/share/libgraph/Font/" -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -MT guile-libgraph.lo -MD -MP -MF .deps/guile-libgraph.Tpo -c guile-libgraph.c -fPIC -DPIC -o .libs/guile-libgraph.o
guile-libgraph.c:25:22: fatal error: libguile.h: No such file or directory
#include <libguile.h>
^
compilation terminated.
Makefile:460: recipe for target 'guile-libgraph.lo' failed
make[2]: *** [guile-libgraph.lo] Error 1
make[2]: Leaving directory '/home/maverick/libgraph-1.0.2'
Makefile:552: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/maverick/libgraph-1.0.2'
Makefile:268: recipe for target 'all' failed
make: *** [all] Error 2
./configure дает этот вывод:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking for gawk... (cached) mawk
checking for sdl-config... /usr/bin/sdl-config
checking for SDL - version >= 1.2.0... yes
checking SDL ==> SDL_image library... SDL_image = yes
checking for Guile... yes
checking for rint in -lm... yes
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for unistd.h... (cached) yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for putenv... yes
checking for rint... yes
checking for strdup... yes
configure: creating ./config.status
config.status: creating doc/Makefile
config.status: creating doc/man/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
задан
12 January 2018 в 20:42
поделиться
4 ответа
libgraph ожидает, что libguile.h будет в стандартных путях включения, а это не так. Сценарий autoconf действительно должен находить правильные местоположения (что я считаю ошибкой системы сборки), но это не так, поэтому вам нужно добавить его путь включения во флаги препроцессора и компоновщика. Стандартный подход:
sudo apt install guile-2.0-dev # In case you didn't install it earlier
CPPFLAGS="$CPPFLAGS $(pkg-config --cflags-only-I guile-2.0)"
CFLAGS="$CFLAGS $(pkg-config --cflags-only-other guile-2.0)"
LDFLAGS="$LDFLAGS $(pkg-config --libs guile-2.0)"
./configure
make
В качестве альтернативы вы можете построить libgraph без поддержки модуля Guile:
./configure --disable-guile
make
ответ дан David Foerster
1 December 2019 в 09:20
поделиться
Новый исходный код libguile установлен в /usr/include/guile/2.0/
так что простое выполнение
sudo mv /usr/include/guile/2.0/* /usr/include/
исправит компиляцию без изменения всех #includes в libgraph.
ответ дан sayeed99
1 December 2019 в 09:20
поделиться
-
Убедитесь, что у вас установлены базовые компиляторы. Для этого выполните команду:
sudo apt-get install build-essential -
Установите несколько необходимых пакетов. Выполните команду:
sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-1.8 guile-1.8-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev libesd0-dev libdirectfb-dev libdirectfb -extra libfreetype6-dev libxext-dev x11proto-xext-dev libfreetype6 libaa1 libaa1-dev libslang2-dev libasound2 libasound2-dev -
Теперь загрузите libgraph.
Скопируйте libgraph-1.0.2.tar.gz в свою домашнюю папку. Щелкните его правой кнопкой мыши и выберите «Извлечь сюда».
Затем по очереди выполните следующие команды:cd libgraph-1.0.2./ configuresudo makesudo make installsudo cp /usr/local/lib/libgraph.* / usr / lib
ответ дан mature
1 December 2019 в 09:20
поделиться
Это Тушар.
Пожалуйста, следуйте альтернативному методу, предложенному Дэвидом Ферстером. Меня устраивает!
./configure --disable-guile
sudo make
sudo make install
sudo cp /usr/local/lib/libgraph.* /usr/lib
ответ дан
27 April 2021 в 00:07
поделиться




