Page 2 of 3

Posted: Mon Dec 05, 2005 10:49 pm
by hybrid
pyrocrickett wrote:I attempted to apply the patch, but I got the following error:

Code: Select all

$ patch -p1 < ../patches/OpenGLGetProc.patch
patching file COpenGLDriver.cpp
Hunk #1 FAILED at 403.
1 out of 1 hunk FAILED -- saving rejects to file COpenGLDriver.cpp.rej
I ran it in my source/Irrlicht/ directory (my patches, obviously, are in my source/patches/ directory).
Well, patch is not very eloquent on reasons for failure. At least the invocation seems to be correct. I don't know the patch format used (-cr) since I usually use -Naur which gives a little more readable output. But it does not seem to find the correct part of the code to apply the patch to. Did you chage the code before?

Posted: Sat Jan 21, 2006 5:22 pm
by brodo
hi,
if i try to apply the patch i get several errors:

Code: Select all

patch unexpectedly ends in middle of line
patching file COpenGLDriver.cpp
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 403.
1 out of 1 hunk FAILED -- saving rejects to file COpenGLDriver.cpp.rej
i also ran it in the /source/irrlicht dir.

Posted: Sun Jan 22, 2006 3:29 pm
by brodo
ok, edited the file manually and now it works!

Posted: Tue Jan 31, 2006 4:11 am
by afecelis
brodo, could you tell me which lines of the patch you changed to get it to work?

also, where you placed the file and which command you used in the shell?

in other words.... everything!!! :wink: I also got this bug and I need to fix it in Linux ASAP.

help!

Code: Select all

patch unexpectedly ends in middle of line
patching file COpenGLDriver.cpp
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 403.
1 out of 1 hunk FAILED -- saving rejects to file COpenGLDriver.cpp.rej

Posted: Tue Jan 31, 2006 4:34 am
by afecelis
or, which of Hybrid's patches on his site will fix this problem?
http://parsys.informatik.uni-oldenburg. ... /irrlicht/

Posted: Tue Jan 31, 2006 12:33 pm
by hybrid
I don't have it in my collection. I could not test it and we did not find a solution for all cases. I made an attempt to combine my previous patches with those from this thread but I was not very confident in their portability.
So we're still searching for a final solution which correctly recognizes the OpenGL library capabilities for ATI and nVidia under Linux! Comments are welcome.

Posted: Tue Jan 31, 2006 2:26 pm
by afecelis
Thanks for replying Hybrid! :wink: That would be great.

Ironically, I had no problems compiling Irrlicht on linux on my laptop (suse10-ATI graphics), but had the opengl issue on my desktop with nvidia. As a matter of fact, I've always had problems compiling Irrlicht under linux with Nvidia, and its always the "glXGetProcAddress" thingie.

Please let us know if you guys succeed on hunting this bug down. :wink:

Posted: Wed Feb 01, 2006 9:27 am
by terefang
IHMO my patch should work with all of Mesa/nVidia/ATI, yet i could only verify this against Mesa and nVidia since i have no ATI hardware available.

cheers,

Posted: Wed Feb 01, 2006 1:22 pm
by afecelis
thnx Terefang. I'm trying it out with an Nvidia card but it doesn't seem to work. i get the error I reported above.

this is what I'm doing:
1. Copy your code into a text file. Rename it to "patch" or "gl.patch"
2. Open a shell and type in: "patch -p1 < patch" or "patch -p1 < gl.patch"
3. get the error.

someone mentioned editing some lines in your patch. Any ideas which lines they should be?

Posted: Wed Feb 01, 2006 3:05 pm
by terefang
afecelis wrote:thnx Terefang. I'm trying it out with an Nvidia card but it doesn't seem to work. i get the error I reported above.

this is what I'm doing:
1. Copy your code into a text file. Rename it to "patch" or "gl.patch"
2. Open a shell and type in: "patch -p1 < patch" or "patch -p1 < gl.patch"
3. get the error.

someone mentioned editing some lines in your patch. Any ideas which lines they should be?
you could edit the irrlicht source file directly by finding the following codeblock around line 403:

Code: Select all

#ifdef GLX_VERSION_1_4
  #define IRR_OGL_LOAD_EXTENSION glXGetProcAddress
  #else
  #define IRR_OGL_LOAD_EXTENSION glXGetProcAddressARB
#endif
and change it to:

Code: Select all

#ifndef GLX_ARB_get_proc_address
  #define IRR_OGL_LOAD_EXTENSION glXGetProcAddress
  #else
  #define IRR_OGL_LOAD_EXTENSION glXGetProcAddressARB
#endif

Posted: Wed Feb 01, 2006 10:20 pm
by afecelis
yippee! thnx Terefang! :D

That's how I used to patch it; directly in the cpp file. It works beautifully! I'm saving this patch in a safe! :wink:

Other error.

Posted: Mon Feb 06, 2006 9:15 pm
by XAngel
Hi!

I am having other mistake after applying the patch for the problem with COpenGLDriver.cpp, see what happens:

Code: Select all

g++ -L/home/xangel/.libs/irrlicht/lib/Linux -L/usr/X11R6/lib -oSoul ./main.o -lIrrlicht -lX11 -lXxf86vm -ljpeg -lz -lGL
/home/xangel/.libs/irrlicht/lib/Linux/libIrrlicht.a(COpenGLTexture.o): In function `irr::video::COpenGLTexture::copyTexture()':
COpenGLTexture.cpp:(.text+0x85a): undefined reference to `gluBuild2DMipmaps'
COpenGLTexture.cpp:(.text+0x86e): undefined reference to `gluErrorString'
Can anybody help myself?

Posted: Mon Feb 06, 2006 10:03 pm
by hybrid
Link with -lGLU -lGL instead of just -lGL MipMapGeneration is located in the OpenGL utilities library.

Posted: Mon Feb 06, 2006 10:24 pm
by XAngel
hybrid wrote:Link with -lGLU -lGL instead of just -lGL MipMapGeneration is located in the OpenGL utilities library.
Thanks!
:roll:

Posted: Tue Feb 14, 2006 2:06 pm
by Guest
Hi,
I applied successfully the patch and then I compiled the lib and evrything gone fine.
But when I try to compile examples I get an error

Code: Select all

g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lGLU -lXxf86vm -lXext -lX11
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o): dans la fonction « irr::video::COpenGLDriver::loadExtensions()    »:
COpenGLDriver.cpp:(.text+0xa4b): référence indéfinie vers « glXGetProcAddress »
COpenGLDriver.cpp:(.text+0xa61): référence indéfinie vers « glXGetProcAddress »
COpenGLDriver.cpp:(.text+0xa77): référence indéfinie vers « glXGetProcAddress »
COpenGLDriver.cpp:(.text+0xa8d): référence indéfinie vers « glXGetProcAddress »
COpenGLDriver.cpp:(.text+0xaa3): référence indéfinie vers « glXGetProcAddress »
../../lib/Linux/libIrrlicht.a(COpenGLDriver.o):COpenGLDriver.cpp:(.text+0xab9): encore plus de références indéfinies suivent vers « glXGetProcAddress »
collect2: ld a retourné 1 code d'état d'exécution
make: *** [all] Erreur 1
I've a nvidia card.

I saw many posts talking about it on the forum but nothing worked for me.
I've all the latest libs mentioned in the threads and I cant solve the problem.

If some guru here can help me...
thanks a lot.