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 03-05-2016, 10:18 AM   #1
Chronic898
LQ Newbie
 
Registered: Mar 2016
Location: Ontario
Distribution: Slackware
Posts: 6

Rep: Reputation: Disabled
Question t4k_scandir error while compiling tuxmath??


Hey folks,
Im quite new to linux, switched to the slackware distro about ten days ago and i must say i am quite happy with it. That being said its been a bit of a learning experience for me, and i still have quite a ways to go.
I've got most of my necessities installed and running properly so im happy.
But ive been having a problem trying to get this tuxmath program installed for my kids, ive tried searching around, but with no success.
when i try to compile it from source with slackbuild i get this error...

Making all in src
make[2]: Entering directory `/tmp/SBo/tuxmath_w_fonts-2.0.3/src'
gcc -DLOCALEDIR="/usr/share/locale" -DHAVE_CONFIG_H -I. -I.. -DLOCALEDIR="/usr/share/locale" -Wall -g -DDATA_PREFIX="/usr/share/tuxmath" -DDEBUG -DSOUND -O2 -march=i486 -mtune=i686 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -pthread -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng14 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -I/usr/include/libxml2 -D_GNU_SOURCE=1 -D_REENTRANT -pthread -I/usr/local/include -I/usr/include/SDL -I/usr/include/librsvg-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng14 -I/usr/include/pixman-1 -I/usr/include/freetype2 -c tuxmath.c
In file included from globals.h:62:0,
from tuxmath.h:36,
from tuxmath.c:30:
/usr/include/t4k_scandir.h:89:5: error: conflicting types for 'scandir'
int scandir(const char *dirname, struct dirent ***namelist, int (*sdfilter)(struct dirent *), int (*dcomp)(const void *, const void *));
^
In file included from /usr/include/t4k_common.h:60:0,
from globals.h:50,
from tuxmath.h:36,
from tuxmath.c:30:
/usr/include/dirent.h:255:12: note: previous declaration of 'scandir' was here
extern int scandir (const char *__restrict __dir,
^
make[2]: *** [tuxmath.o] Error 1
make[2]: Leaving directory `/tmp/SBo/tuxmath_w_fonts-2.0.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/tuxmath_w_fonts-2.0.3'
make: *** [all] Error 2
bash-4.2#


Can anyone help me out qith this??
TIA!
 
Old 03-05-2016, 05:51 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 618

Rep: Reputation: 237Reputation: 237Reputation: 237
You need to find out why libtool is not finding scandir(). Check your config.log for clues.

What should happen is: the configure script finds scandir() and sets HAVE_SCANDIR to 1. Then t4k_scandir.h is not included, eliminating the conflicting types error.

globals.h:
Code:
#if !defined HAVE_SCANDIR || defined BUILD_MINGW32
#include <t4k_scandir.h>
#endif
As a hack, you can can try setting HAVE_SCANDIR to 1 in config.h and see if it compiles. You'll probably have to change HAVE_ALPHASORT also.
Code:
...
/* Define to 1 if you have the `alphasort' function. */
#define HAVE_ALPHASORT 1
...
/* Define to 1 if you have the `scandir' function. */
#define HAVE_SCANDIR 1
...
 
1 members found this post helpful.
Old 03-05-2016, 07:29 PM   #3
Chronic898
LQ Newbie
 
Registered: Mar 2016
Location: Ontario
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by norobro View Post
You need to find out why libtool is not finding scandir(). Check your config.log for clues.

As a hack, you can can try setting HAVE_SCANDIR to 1 in config.h and see if it compiles. You'll probably have to change HAVE_ALPHASORT also.
Code:
...
/* Define to 1 if you have the `alphasort' function. */
#define HAVE_ALPHASORT 1
...
/* Define to 1 if you have the `scandir' function. */
#define HAVE_SCANDIR 1
...
Thanks! that hack worked great, got a little farther along then got another error.
Not sure why im having these problems seems like a basic program many people have installed without much trouble.

now says...
[code]
make[2]: Entering directory `/tmp/SBo/tuxmath_w_fonts-2.0.3/src'
gcc -Wall -g -DDATA_PREFIX=\"/usr/share/tuxmath\" -DDEBUG -DSOUND -O2 -march=i486 -mtune=i686 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -pthread -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng14 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -I/usr/include/libxml2 -D_GNU_SOURCE=1 -D_REENTRANT -pthread -I/usr/local/include -I/usr/include/SDL -I/usr/include/librsvg-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng14 -I/usr/include/pixman-1 -I/usr/include/freetype2 -o tuxmath tuxmath.o setup.o titlescreen.o menu.o menu_lan.o game.o factoroids.o fileops_media.o options.o credits.o highscore.o audio.o network.o mathcards.o campaign.o multiplayer.o fileops.o SDL_rotozoom.o lessons.o server.o -lm -Wl,-rpath,/usr/lib -lSDL -lpthread -Wl,-rpath,/usr/lib -lSDL_image -lSDL -lpthread -Wl,-rpath,/usr/lib -lSDL_mixer -lSDL -lpthread -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lglib-2.0 -lcairo -Wl,-rpath,/usr/lib -lSDL_net -lSDL -lpthread -lxml2 -Wl,-rpath,/usr/lib -L/usr/local/lib -lt4k_common -lSDL_mixer -lSDL_net -lSDL_image -lSDL_Pango -lrsvg-2 -lm -lxml2 -lSDL -lpthread -lpango-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lglib-2.0
/usr/lib/gcc/i486-slackware-linux/4.8.2/../../../libt4k_common.so: undefined reference to `SDLPango_CreateContext_GivenFontDesc'
collect2: error: ld returned 1 exit status
make[2]: *** [tuxmath] Error 1
make[2]: Leaving directory `/tmp/SBo/tuxmath_w_fonts-2.0.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/tuxmath_w_fonts-2.0.3'
make: *** [all] Error 2
bash-4.2#
[code]

i searched and couldnt find "libt4k_common.so"
I have libt4k and sdlpango installed... i believe properly..

Any clues?
 
Old 03-05-2016, 08:23 PM   #4
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 618

Rep: Reputation: 237Reputation: 237Reputation: 237
I don't mean the following to be condescending, just a hint. When compiling from source it is always a good idea to read the docs, i.e. README and/or INSTALL files.

That being said, from the INSTALL file:
Quote:
To build Tux Math, t4k_common must first be built and installed.
I'm puzzled as to why you were getting the earlier errors too. I had no problems compiling tuxmath on my Debian box. I didn't compile libt4k-common0. I just downloaded it and libt4k-common0-dev with the package manager

Tuxmath looks like a neat app for kids!

HTH
 
Old 03-06-2016, 04:43 PM   #5
Chronic898
LQ Newbie
 
Registered: Mar 2016
Location: Ontario
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: Disabled
i do have t4k_common installed, which is why im puzzled.
 
Old 03-06-2016, 06:36 PM   #6
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 618

Rep: Reputation: 237Reputation: 237Reputation: 237
Did you apply the patch to SDL_Pango? https://slackbuilds.org/slackbuilds/...API-adds.patch
 
Old 03-25-2016, 07:25 PM   #7
Chronic898
LQ Newbie
 
Registered: Mar 2016
Location: Ontario
Distribution: Slackware
Posts: 6

Original Poster
Rep: Reputation: Disabled
When i double click it, it opens in Kompare. I apply all differences and click save, it gives me an error saying It could not upload the temporary file to the destination location.
It saves it to /tmp/ instead.
I copy it and rename it as the file being patched, over-writing the original one in the process.

Is this the right process? Is there an easier way?
It still deosnt build,

Thanks for your help this far.
 
Old 03-26-2016, 12:09 PM   #8
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 618

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Is there an easier way?
If, as you say in post #1, you are using slackbuild the patch should have been applied by the build script: SDL_Pango.SlackBuild (https://slackbuilds.org/slackbuilds/...ies/SDL_Pango/).
Code:
patch -p0 < $CWD/SDL_Pango-0.1.2-API-adds.patch || exit 1
If you want to try manually patching I recommend perusing the patch man page first.

As far as saving the file is concerned, the normal convention is to name patch files with the extension patch but AFAIK any valid file name will work. The name of the file on the server, as you can see above, is: "SDL_Pango-0.1.2-API-adds.patch".

Notice the relative path on the first two lines of the patch file (src/SDL_Pango.c). The easiest way to apply the patch would be to save the file in the directory above src/ (I assume the root directory of SDL_Pango). Then on the command line in the directory where you saved the file type:
Code:
patch -p0 < name_of_saved_file
Quote:
I copy it and rename it as the file being patched, over-writing the original one in the process.
I'm not clear about what you did here. If you modified SDL_Pango.c or SDL_Pango.h you'll need to revert to the original files.
 
  


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
Long shot--custom games on Tuxmath noordinaryspider Linux - Software 2 10-04-2015 10:04 AM
Fedora 9: error when compiling flash plug-in with error failed dependencies seow_ming Fedora 2 06-17-2008 07:17 PM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - General 1 12-11-2007 06:54 AM
Error when compiling kernel linux-2.6.22 : make: ***[_modinst_post] Error 137 ngoclan.it Linux - Newbie 0 12-11-2007 06:49 AM
i get an error ./term.c :95 error conflicting types of tpam when compiling bitchx eveningblush Programming 0 03-30-2006 06:46 AM


All times are GMT -5. The time now is 01:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration