Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hohoo

Pages: [1]
1
General / Segmentation fault; Ubuntu 10.4 and Nvidia "current&quo
« on: May 09, 2010, 08:50:59 pm »
I recently upgraded to the latest version of Ubuntu. (32-bit, by the way.) Everything works well – except for SFML.

Only Shader, Image and Sprite were used.
Quote
(gdb) r
Starting program: /home/hohoo/projektit/mke/mke
[Thread debugging using libthread_db enabled]
[New Thread 0xb3a1bb70 (LWP 3596)]
[Thread 0xb3a1bb70 (LWP 3596) exited]
[New Thread 0xb3a1bb70 (LWP 3597)]
[Thread 0xb3a1bb70 (LWP 3597) exited]
[New Thread 0xb3a1bb70 (LWP 3598)]
[Thread 0xb3a1bb70 (LWP 3598) exited]
[New Thread 0xb3a1bb70 (LWP 3599)]
[Thread 0xb3a1bb70 (LWP 3599) exited]
[New Thread 0xb7a23b70 (LWP 3600)]
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
no message buffer overruns
[Thread 0xb7a23b70 (LWP 3600) exited]
[New Thread 0xb3a1bb70 (LWP 3601)]
[Thread 0xb3a1bb70 (LWP 3601) exited]
[New Thread 0xb3a1bb70 (LWP 3602)]
[Thread 0xb3a1bb70 (LWP 3602) exited]
[New Thread 0xb3a1bb70 (LWP 3603)]
[Thread 0xb3a1bb70 (LWP 3603) exited]
[New Thread 0xb3a1bb70 (LWP 3604)]
[Thread 0xb3a1bb70 (LWP 3604) exited]
[New Thread 0xb7a23b70 (LWP 3605)]
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
no message buffer overruns
[Thread 0xb7a23b70 (LWP 3605) exited]
[New Thread 0xb3a1bb70 (LWP 3606)]
[Thread 0xb3a1bb70 (LWP 3606) exited]
[New Thread 0xb3a1bb70 (LWP 3607)]
[Thread 0xb3a1bb70 (LWP 3607) exited]
[New Thread 0xb3a1bb70 (LWP 3608)]
[Thread 0xb3a1bb70 (LWP 3608) exited]
[New Thread 0xb3a1bb70 (LWP 3609)]
[Thread 0xb3a1bb70 (LWP 3609) exited]
[New Thread 0xb7a23b70 (LWP 3610)]
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
no message buffer overruns
[Thread 0xb7a23b70 (LWP 3610) exited]
Program received signal SIGSEGV, Segmentation fault.
0x01af3a9d in ?? () from /usr/lib/nvidia-current/libGLcore.so.1

Backtrace:
Quote
(gdb) bt
#0  0x01af3a9d in ?? () from /usr/lib/nvidia-current/libGLcore.so.1
#1  0x00000d27 in ?? ()
#2  0x004bbff4 in ?? () from /lib/tls/i686/cmov/libc.so.6
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

2
SFML projects / Vala bindings have arrived!
« on: April 25, 2010, 12:06:33 am »
Get them here: http://bitbucket.org/hohoo/vala-sfml/
Or use this command:
Code: [Select]
hg clone http://bitbucket.org/hohoo/vala-sfml

They're still in an early stage (I might implement a delegate-based event system and many things may change), so if you happen to use Vala, why not try them out?

3
C / incompatible type for argument 4 of ‘sfWindow_Create’
« on: April 23, 2010, 09:20:25 am »
Quote from: "Laurent"
What is self? Where is it declared?

That appeared to be a Vala bug. But it seems that self is declared on the last line.

4
C / incompatible type for argument 4 of ‘sfWindow_Create’
« on: April 22, 2010, 11:05:07 pm »
By the way, what's wrong with this code?
Code: [Select]
static sfWindow* sfml_window_window_new_simple (sfVideoMode mode, const char* title) {
sfContextSettings _context_settings;
g_return_val_if_fail (title != NULL, NULL);
memset (self, 0, sizeof (sfWindow));
_context_settings = sfml_window_create_context_settings ((guint) 24, (guint) 8, 0, 2, 0);
self = (sfWindow*) sfWindow_Create (mode, title, sfDefaultStyle, &_context_settings);
}

Quote

31: error: ‘self’ undeclared (first use in this function)
31: error: (Each undeclared identifier is reported only once
31: error: for each function it appears in.)
31: error: invalid application of ‘sizeof’ to incomplete type ‘sfWindow’

5
General / Failed to build SFML2 on Fedora Linux 12
« on: April 22, 2010, 08:36:08 pm »
You could try downloading Debian packages of them and convert them to rpm with Alien.

http://packages.debian.org/search?keywords=libsoil

6
C / incompatible type for argument 4 of ‘sfWindow_Create’
« on: April 22, 2010, 07:28:19 pm »
Sorry for the double post, but I have no idea what's going on with this code:
Code: [Select]
/* test.c generated by valac, the Vala compiler
 * generated from test.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <SFML/Window.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define _sfWindow_Destroy0(var) ((var == NULL) ? NULL : (var = (sfWindow_Destroy (var), NULL)))



gint _vala_main (char** args, int args_length1);



static sfContextSettings sfml_window_create_context_settings (guint depth_bits, guint stencil_bits, guint antialiasing_level, guint major_version, guint minor_version) {
sfContextSettings result;
sfContextSettings _tmp0_;
result = (_tmp0_.DepthBits = depth_bits, _tmp0_.StencilBits = stencil_bits, _tmp0_.AntialiasingLevel = antialiasing_level, _tmp0_.MajorVersion = major_version, _tmp0_.MinorVersion = minor_version, _tmp0_);
return result;
}


gint _vala_main (char** args, int args_length1) {
gint result = 0;
sfContextSettings cs;
sfVideoMode _tmp0_;
sfVideoMode vm;
sfWindow* w;
cs = sfml_window_create_context_settings ((guint) 800, (guint) 600, (guint) 32, 2, 0);
vm = (_tmp0_.Width = (guint) 320, _tmp0_.Height = (guint) 240, _tmp0_.BitsPerPixel = (guint) 32, _tmp0_);
if (sfVideoMode_IsValid (vm)) {
fprintf (stdout, "%d\n", (gint) cs.MajorVersion);
}
w = sfWindow_Create (vm, "Hej!", sfDefault, cs);
result = (gint) sfNone;
_sfWindow_Destroy0 (w);
return result;
}


int main (int argc, char ** argv) {
g_type_init ();
return _vala_main (argv, argc);
}





I'm getting these errors:
Quote
test.vala.c: In function ‘_vala_main’:
test.vala.c:39: error: incompatible type for argument 4 of ‘sfWindow_Create’
/usr/local/include/SFML/Window/Window.h:75: note: expected ‘const struct sfContextSettings *’ but argument is of type ‘sfContextSettings’

I don't see any sfContextSettings* there.

EDIT: Fixed again. I need to be more careful.

7
C / incompatible type for argument 4 of ‘sfWindow_Create’
« on: April 22, 2010, 02:53:14 pm »
Eh
Quote
./test: error while loading shared libraries: libsfml-window.so.1.5: cannot open shared object file: No such file or directory

I'm using SFML2 but it seems to be looking for an ancient version...

EDIT: Fixed; turned out there was something wrong with my CSFML libs.

8
C / incompatible type for argument 4 of ‘sfWindow_Create’
« on: April 22, 2010, 02:37:43 pm »
Quote from: "Laurent"
The compiler is right, sfVideoMode_IsValid doesn't want a pointer.
Code: [Select]
sfVideoMode_IsValid (vm)

Ok, but when I do that, I get this error instead:
Quote
undefined reference to `sfVideoMode_IsValid'

Even though I linked to sfml-window and sfml-system

9
C / incompatible type for argument 4 of ‘sfWindow_Create’
« on: April 22, 2010, 02:32:28 pm »
I'm writing my Vala bindings, but something seems to be wrong. On line 27 (if (sfVideoMode_IsValid (&vm))) I get this error:
Quote
test.c:27: error: incompatible type for argument 1 of ‘sfVideoMode_IsValid’


(For those who don't know: Vala is translated into C first and then compiled.)

Here is the code:
Code: [Select]
/* test.c generated by valac, the Vala compiler
 * generated from test.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include <SFML/Window.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>




gint _vala_main (char** args, int args_length1);



gint _vala_main (char** args, int args_length1) {
gint result = 0;
sfContextSettings _tmp0_ = {0};
sfContextSettings cs;
sfVideoMode _tmp1_ = {0};
sfVideoMode vm;
cs = (_tmp0_.DepthBits = (guint) 800, _tmp0_.StencilBits = (guint) 600, _tmp0_.AntialiasingLevel = (guint) 32, _tmp0_.MajorVersion = (guint) 2, _tmp0_.MinorVersion = (guint) 0, _tmp0_);
vm = (_tmp1_.Width = (guint) 320, _tmp1_.Height = (guint) 240, _tmp1_.BitsPerPixel = (guint) 32, _tmp1_);
if (sfVideoMode_IsValid (&vm)) {
fprintf (stdout, "%d\n", (gint) cs.MajorVersion);
}
result = (gint) sfNone;
return result;
}


int main (int argc, char ** argv) {
g_type_init ();
return _vala_main (argv, argc);
}





10
General / SFML2 build problems
« on: April 21, 2010, 07:24:05 pm »
Quote from: "sebbu"
GCC can print messages in various language.
this error is in finnish, probably because of locale / LC_ALL / LANG or corrupt/incorrect lc_message file (the ones with .mo extension)

I already got that kind of error, but i upgraded gcc soon after it.

I'm Finnish, so it's not a problem for me. I just think GCC's errors are a big wall of text.

11
General / SFML2 build problems
« on: April 20, 2010, 05:16:40 pm »
Quote from: "Laurent"
I totally agree for this one
Quote
error: GL/glew.h: Tiedostoa tai hakemistoa ei ole

:lol:

...

I seriously didn't see that one.

12
General / SFML2 build problems
« on: April 20, 2010, 05:05:42 pm »
Quote from: "Laurent"
Hi

To compile SFML 2, you need to install the development files for GLEW.

To compile CSFML 2, ou need to install SFML 2 ;)

Thank you! The errors produced by GCC tend to be too uninformative. Or then it's just me.

13
General / SFML2 build problems
« on: April 20, 2010, 04:11:48 pm »
I downloaded the latest SVN snapshot and tried to build it. However, all I get is loads of errors.

I'm especially interested in CSFML (I'm going to write bindings for Vala). This is what I get when I compile it:
Quote
cd ./build/make && make csfml
make[1]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
mkdir -p ../../lib
make -f Makefile.system
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
g++ -shared -Wl,-soname,libcsfml-system.so.2.0 -o ../../lib/libcsfml-system.so.2.0 ../../src/SFML/System/Clock.o ../../src/SFML/System/Mutex.o ../../src/SFML/System/Randomizer.o ../../src/SFML/System/Sleep.o ../../src/SFML/System/Thread.o -lsfml-system
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
mkdir -p ../../lib
make -f Makefile.window
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
g++ -o ../../src/SFML/Window/VideoMode.o -c ../../src/SFML/Window/VideoMode.cpp -W -Wall -pedantic -Wno-unused -DCSFML_EXPORTS -g -O2 -DNDEBUG -I../../include -I../../src -fPIC
../../src/SFML/Window/VideoMode.cpp: In function ‘const sfVideoMode* sfVideoMode_GetFullscreenModes(size_t*)’:
../../src/SFML/Window/VideoMode.cpp:54: error: expected initializer before ‘<’ token
../../src/SFML/Window/VideoMode.cpp:57: error: ‘modes’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:59: error: expected initializer before ‘<’ token
../../src/SFML/Window/VideoMode.cpp:60: error: ‘vector’ is not a member of ‘std’
../../src/SFML/Window/VideoMode.cpp:60: error: expected primary-expression before ‘>’ token
../../src/SFML/Window/VideoMode.cpp:60: error: ‘::const_iterator’ has not been declared
../../src/SFML/Window/VideoMode.cpp:60: error: expected ‘;’ before ‘it’
../../src/SFML/Window/VideoMode.cpp:60: error: ‘it’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:60: error: ‘SFMLModes’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:71: error: ‘modes’ was not declared in this scope
../../src/SFML/Window/VideoMode.cpp:73: error: ‘modes’ was not declared in this scope
make[2]: *** [../../src/SFML/Window/VideoMode.o] Virhe 1
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
make[1]: *** [window] Virhe 2
make[1]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/CSFML/build/make"
make: *** [csfml] Virhe 2


If I try to build the "regular" SFML, I get this:
Quote
cd ./build/make && make sfml
make[1]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
mkdir -p ../../lib
make -f Makefile.system
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
g++ -shared -Wl,-soname,libsfml-system.so.2.0 -o ../../lib/libsfml-system.so.2.0 ../../src/SFML/System/Clock.o ../../src/SFML/System/Err.o ../../src/SFML/System/Lock.o ../../src/SFML/System/Mutex.o ../../src/SFML/System/Randomizer.o ../../src/SFML/System/Sleep.o ../../src/SFML/System/String.o ../../src/SFML/System/Thread.o ../../src/SFML/System/ThreadLocal.o ../../src/SFML/System/Utf.o ../../src/SFML/System/Unix/Initializer.o ../../src/SFML/System/Unix/MutexImpl.o ../../src/SFML/System/Unix/Platform.o ../../src/SFML/System/Unix/ThreadImpl.o ../../src/SFML/System/Unix/ThreadLocalImpl.o -lpthread
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
mkdir -p ../../lib
make -f Makefile.window
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
g++ -shared -Wl,-soname,libsfml-window.so.2.0 -o ../../lib/libsfml-window.so.2.0 ../../src/SFML/Window/Context.o ../../src/SFML/Window/GlContext.o ../../src/SFML/Window/Input.o ../../src/SFML/Window/VideoMode.o ../../src/SFML/Window/Window.o ../../src/SFML/Window/WindowImpl.o ../../src/SFML/Window/Linux/GlxContext.o ../../src/SFML/Window/Linux/Joystick.o ../../src/SFML/Window/Linux/VideoModeImpl.o ../../src/SFML/Window/Linux/WindowImplX11.o -lX11 -lXrandr -lGL
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
mkdir -p ../../lib
make -f Makefile.graphics
make[2]: Siirrytään hakemistoon "/home/hohoo/Lataukset/sfml2/build/make"
g++ -o ../../src/SFML/Graphics/GLCheck.o -c ../../src/SFML/Graphics/GLCheck.cpp -W -Wall -pedantic -g -O2 -DNDEBUG -I../../include -I../../src -fPIC -I/usr/include/freetype2
In file included from ../../src/SFML/Graphics/GLCheck.cpp:28:
../../src/SFML/Graphics/GLCheck.hpp:32:21: error: GL/glew.h: Tiedostoa tai hakemistoa ei ole
../../src/SFML/Graphics/GLCheck.cpp: In function ‘void sf::priv::GLCheckError(const std::string&, unsigned int)’:
../../src/SFML/Graphics/GLCheck.cpp:42: error: ‘GLenum’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:42: error: expected ‘;’ before ‘errorCode’
../../src/SFML/Graphics/GLCheck.cpp:44: error: ‘errorCode’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:44: error: ‘GL_NO_ERROR’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:52: error: ‘GL_INVALID_ENUM’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:59: error: ‘GL_INVALID_VALUE’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:66: error: ‘GL_INVALID_OPERATION’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:73: error: ‘GL_STACK_OVERFLOW’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:80: error: ‘GL_STACK_UNDERFLOW’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:87: error: ‘GL_OUT_OF_MEMORY’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp:94: error: ‘GL_INVALID_FRAMEBUFFER_OPERATION_EXT’ was not declared in this scope
../../src/SFML/Graphics/GLCheck.cpp: In function ‘void sf::priv::EnsureGlewInit()’:
../../src/SFML/Graphics/GLCheck.cpp:119: error: ‘glewInit’ was not declared in this scope
make[2]: *** [../../src/SFML/Graphics/GLCheck.o] Virhe 1
make[2]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
make[1]: *** [graphics] Virhe 2
make[1]: Poistutaan hakemistosta "/home/hohoo/Lataukset/sfml2/build/make"
make: *** [sfml] Virhe 2

Pages: [1]