FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Pages: [1] 2

Author Topic: Weird SDL_ttf problem on Debian  (Read 12586 times)

happycodemonkey

  • Newbie
  • Posts: 5
    • View Profile
Weird SDL_ttf problem on Debian
« on: March 25, 2008, 08:03:54 pm »

Scons is have the very odd problem of not being able to locate my SDL_ttf.h file, even though it seems to be having no problem locating the rest of the SDL header files. I tried putting the path in the linux-config file, as well as even trying to make my own pkgconfig file in the Linux folder, and it still can't see it. Any suggestions? Am I missing something super obvious? Thanks, I appreciate the help!

Logged

elcugo

  • Newbie
  • Posts: 3
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #1 on: March 27, 2008, 01:45:13 am »

I had the same problems. I had to manually hack build/linux2-config-dist.py and comment out the lines that checks for SDL_ttf, SDL_image and guichan.
Logged

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #2 on: March 04, 2010, 02:37:52 pm »

 >:( nothing helps in my case :(

$ scons ext=1
scons: Reading SConscript files ...
Checking for vorbisfile (using pkg-config)...yes
Checking for openal (using pkg-config)...yes
Checking for SDL (using pkg-config)...yes
Checking for SDL_ttf (using pkg-config)...no
Checking for SDL_ttf (using sdl_ttf-config)... no
Checking for C++ library SDL_ttf... no
Required lib SDL_ttf not found!
$ ld -lSDL
ld: warning: cannot find entry symbol _start; not setting start address

and in build/linux/pkgconfig_files/sdl.pc
wrong folder is set
/usr/local while on my Fedora 12 it is empty !!
should be /usr (but changing it do noting :()

SDL and SDL_ttf installed SDL_ttf = 2.0.9
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Weird SDL_ttf problem on Debian
« Reply #3 on: March 04, 2010, 02:54:28 pm »

Just the default question - sdl ttf dev packages are installed?

I've

Code: [Select]
libsdl-ttf2.0-dev
libsdl-ttf2.0-0

installed here on my system. (ubuntu)

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #4 on: March 04, 2010, 02:57:29 pm »

yes both with:
yum install SDL_ttf*
yum install SDL*
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Weird SDL_ttf problem on Debian
« Reply #5 on: March 04, 2010, 03:17:41 pm »

btw - the correct command is

Code: [Select]
scons ext
to build the fife dependencies. But I guess that doesn't solve your problem.

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #6 on: March 05, 2010, 10:15:55 am »

If "ext" only all compile well to this point and them message is the same.  :-\

How to  clean everything I've compiled ? And them go back in history to earlier version?
Maybe it's a bug in current version caused by my config.

Oh and pkg-config can't found SDL_ttf so I've copied fife/build/linux/pkgconfig_files/sdl.pc to proper folder. Now pkg... see it. But scons gives the same results :(
« Last Edit: March 06, 2010, 09:19:28 am by przemo_li »
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #7 on: March 07, 2010, 09:20:38 pm »

To clean all your build stuff you should be able to run: scons -c ext && scons -c fife

then if you want to get rid of your changes to the fife source code you will need to do "svn revert" in the top directory where you checked out fife.

Where are the SDL header files installed on your system?
Logged

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #8 on: March 08, 2010, 01:50:43 pm »

/usr/include/SDL/SDL.h
/usr/include/SDL.SDL_ttf.h
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #9 on: March 08, 2010, 01:55:15 pm »

in the absence of any package config files the scons build scripts should certainly be looking in /usr/include/SDL for these files as long as the linux2-config.py is chosen by the build system as the appropriate os specific script to run.

do you have any package config files that may be pointing to another location?
Logged

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #10 on: March 08, 2010, 01:57:17 pm »

in the absence of any package config files the scons build scripts should certainly be looking in /usr/include/SDL for these files as long as the linux2-config.py is chosen by the build system as the appropriate os specific script to run.

do you have any package config files that may be pointing to another location?
can you explain what "any package config files" mean ?

what is worst :( this code work well:
http://www.lazyfoo.net/SDL_tutorials/lesson07/index.php

if compiled by:
g++ lesson07.cpp -lSDL -lSDL_ttf -lSDL_image

so SDL_ttf is working properly :/ ?
« Last Edit: March 08, 2010, 02:05:03 pm by przemo_li »
Logged

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #11 on: March 08, 2010, 02:22:24 pm »

How to tell scons not to check for SDL_ttf ?
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #12 on: March 08, 2010, 03:15:47 pm »

the package config command being run is: "pkg-config --libs --cflags sdl_ttf"
it also runs this: "sdl_ttf-config --libs --cflags"

you can run these yourself in a terminal and post the output here if you like

here is the file with these checks: http://fife.trac.cvsdude.com/engine/browser/trunk/utils/scons/scons_utils.py#L80

I would really like to figure out why the checks are not working for you instead of you just taking the checks out, but if we can't figure something out we will resort to that.

Also could you please post the build command you are using and also all of the output that gets produced as a result
Logged

przemo_li

  • Newbie
  • Posts: 10
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #13 on: March 08, 2010, 03:19:53 pm »

[przemo@null lesson07]$ pkg-config --libs --cflags sdl_ttf
Package sdl_ttf was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl_ttf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl_ttf' found
[przemo@null lesson07]$ locate sdl_ttf.pc
[przemo@null lesson07]$ sdl_ttf-config
bash: sdl_ttf-config: command not found
[przemo@null lesson07]$ ^C
[przemo@null lesson07]$


:( i' do not have sdl_ttf.pc at all

EDIT [SOLVED]
I've had to move SDL_ttf.pc form build directory from engine tree to proper place change sdl_ttf libs path to correct one and them copy to sdl_ttf.pc then copy sdl_ttf.pc to sdl_image.pc and now scons see SDL_ttf (and SDL_image). :D

Also I've done it for xcursor, guichan, boost.

As for now "boost/function.hpp do not exist" while compiling :(
« Last Edit: March 08, 2010, 03:44:47 pm by przemo_li »
Logged

vtchill

  • Developer
  • Full Member
  • *
  • Posts: 206
    • View Profile
Re: Weird SDL_ttf problem on Debian
« Reply #14 on: March 08, 2010, 03:43:21 pm »

You must build the external dependencies (including guichan) first using the following build command in the fife directory:

scons ext


Then run either of the following commands to build fife as a python library
scons install-python    (this will install fife in your python site-packages so all python modules can see it)
scons fife-python         (this will build fife locally and not install in the site-packages directory)



OK I read your rely over again and understand that moving the .pc from build is what fixed your problem, but i still don't know why the manual look up we do after all else fails didn't work. That should find it when pkg config fails to as long as we look in the right directory. We are certainly looking in /usr/include/SDL, we add it to the CPPPATH for searching here: http://fife.trac.cvsdude.com/engine/browser/trunk/build/linux2-config.py#L35
« Last Edit: March 08, 2010, 03:50:44 pm by vtchill »
Logged
Pages: [1] 2