Author Topic: r1q2 how to compile - linux?  (Read 3522 times)

Offline Tofik

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
r1q2 how to compile - linux?
« on: July 31, 2019, 05:47:40 AM »
basing on that source code https://github.com/tastyspleen/r1q2-archive

i was failing at
Code: [Select]
../../qcommon/cmd.c:1546:1: fatal error: opening dependency file .depends/cmd.d:
found solution at --->
https://www.reddit.com/r/linuxquestions/comments/lwi15/problem_compiling_r1q2_on_x86_64_lmde/
my actual problem is
Code: [Select]
    image->upload_width, image->upload_height, image->name, image->upload_width * image->upload_height * sizeof(int));
                                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../ref_gl/gl_image.c: In function ‘GL_FreeUnusedImages’:
../../ref_gl/gl_image.c:3338:25: warning: passing argument 2 of ‘qglDeleteTextures’ from incompatible pointer type [-Wincompatible-pointer-types]
   qglDeleteTextures (1, &image->texnum);
                         ^~~~~~~~~~~~~~
../../ref_gl/gl_image.c:3338:25: note: expected ‘const GLuint *’ {aka ‘const unsigned int *’} but argument is of type ‘long unsigned int *’
../../ref_gl/gl_image.c: In function ‘GL_ShutdownImages’:
../../ref_gl/gl_image.c:3492:25: warning: passing argument 2 of ‘qglDeleteTextures’ from incompatible pointer type [-Wincompatible-pointer-types]
   qglDeleteTextures (1, &image->texnum);
                         ^~~~~~~~~~~~~~
../../ref_gl/gl_image.c:3492:25: note: expected ‘const GLuint *’ {aka ‘const unsigned int *’} but argument is of type ‘long unsigned int *’
make[1]: *** [<wbudowane>: gl_image.o] Błąd 1
make[1]: Opuszczenie katalogu '/home/lsd/r1q2-archive/binaries/ref_gl'
make: *** [Makefile:17: ref_gl] Błąd 2
lsd@lsd-K56CB:~/r1q2-archive/binaries$ make client
make -C client
make[1]: Wejście do katalogu '/home/lsd/r1q2-archive/binaries/client'
make[1]: Nie ma nic do zrobienia w 'default'.
make[1]: Opuszczenie katalogu '/home/lsd/r1q2-archive/binaries/client'
lsd@lsd-K56CB:~/r1q2-archive/binaries$
« Last Edit: August 02, 2019, 04:41:20 AM by Tofik »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline NullNotZero

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • NullNotZero's Quake2 Page
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #1 on: July 31, 2019, 01:44:22 PM »
You will need to create the .depends directories in each of your binaries folders (game, client, r1q2ded, ref_gl) that should correct your error.

 :dohdohdoh: Just noticed my response was too late  :dohdohdoh: As for any other errors make sure you have zlib1g installed.

Offline Tofik

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #2 on: July 31, 2019, 10:48:04 PM »
Code: [Select]
../../ref_gl/gl_image.c:3492:25: note: expected 'const GLuint *' {aka 'const unsigned int *'} but argument is of type 'long unsigned int *'
make[1]: *** [<builtin>: gl_image.o] Error 1
make[1]: Leaving directory '/home/lsd/Pobrane/r1q2-archive/binaries/ref_gl'
make: *** [Makefile:17: ref_gl] Error 2
Still landing in same spot i pass im not into coding
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #3 on: July 31, 2019, 11:35:10 PM »
The fatal line is actually a little bit above where your post quotes:

In file included from ../../ref_gl/gl_draw.c:23:0:
../../ref_gl/gl_local.h:27:19: fatal error: GL/gl.h: No such file or directory
 #include <GL/gl.h>

The #include <GL/gl.h> means the build expects a module (the OpenGL module libraries and their headers) to be installed on your Linux and the path to that library to be available to the compiler.

You'll have to search for how to install the OpenGL development libraries for your version of Linux.

QwazyWabbit

P.S. If you are not intending to build the full client and the ref_gl but only want to build the r1q2ded server then all you need to do is 'make r1q2ded' and you are done. The dedicated server binary will be in the r1q2ded directory.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Tofik

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #4 on: August 01, 2019, 12:56:35 AM »
thanks for response, but
https://www.wikihow.com/Install-Mesa-(OpenGL)-on-Linux-Mint

im still landing on same spot, don know how to edit path or im supposed to edit every .h file (which can cause more troubles)

ok it makes client
Code: [Select]
====== Quake2 Initialized ======
R1Q2 build 8012, compiled Aug  1 2019.
http://www.r1ch.net/stuff/r1q2/
Linux x86-64 (./quake2-r1q2)

Console initialized.
/dev/dsp: No such file or directory
Could not open /dev/dsp
------- Loading ref_softx.so -------
LoadLibrary("ref_softx.so") failed: ./ref_softx.so: cannot open shared object file: No such file or directory
Refresh failed
Couldn't fall back to software refresh!
Error: Couldn't fall back to software refresh!

but it has missing viedo drivers where we talked before

os. firstly i thought its good place to make topic, so can moderator move it to thouble shooting ?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #5 on: August 01, 2019, 09:05:01 AM »
Keep to step by step.

Did you check the OpenGL installation by copy-pasting their sample code in that Wiki? If it works then cd into the r1q2 binaries and did make ref_gl complete without errors?

From your post it looks like it worked but your r1q2 client isn’t opening the ref_gl but is opening ref_softx, the software renderer. This is not part of r1q2 but comes with quake2 for Linux. You have me a little confused now.

Did you do ‘make install’ after building r1q2 successfully? I believe this was the next step but check the instructions for r1q2 as I don’t have access right now. R1q2 does assume you have the original Quake2 for Linux previously installed.



  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Tofik

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #6 on: August 01, 2019, 10:50:50 AM »
Quote
Did you check the OpenGL installation by copy-pasting their sample code in that Wiki? If it works then cd into the r1q2 binaries and did make ref_gl complete without errors?
I checked and it worked like in tutorial.
No, its landing at same place:
Code: [Select]
make[1]: *** [<builtin>: gl_image.o] Error 1
make[1]: Leaving directory '/home/lsd/r1q2-archive/binaries/ref_gl'
make: *** [Makefile:17: ref_gl] Error 2

Quote
From your post it looks like it worked but your r1q2 client isn’t opening the ref_gl but is opening ref_softx, the software renderer. This is not part of r1q2 but comes with quake2 for Linux. You have me a little confused now.

Thats nice to hear and i didnt know about that, and yes since mine "ref_gl" isnt compiling it tries to use ref_softx.

Quote
Did you do ‘make install’ after building r1q2 successfully? I believe this was the next step but check the instructions for r1q2 as I don’t have access right now. R1q2 does assume you have the original Quake2 for Linux previously installed.

Code: [Select]
lsd@lsd-K56CB:~/r1q2-archive/binaries$ make install
make: *** No rule to make target 'install'.  Stop.
lsd@lsd-K56CB:~/r1q2-archive/binaries$ ls
Makefile  Sample-OpenGL-Programs  client  game  make.inc  r1q2ded  ref_gl
lsd@lsd-K56CB:~/r1q2-archive/binaries$ cd client/
lsd@lsd-K56CB:~/r1q2-archive/binaries/client$ make install
make: *** No rule to make target 'install'.  Stop.
lsd@lsd-K56CB:~/r1q2-archive/binaries/client$
anyway  ref_gl its r1ch R1GL or just opengl?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #7 on: August 01, 2019, 09:21:17 PM »
Quote
Did you check the OpenGL installation by copy-pasting their sample code in that Wiki? If it works then cd into the r1q2 binaries and did make ref_gl complete without errors?
Quote
I checked and it worked like in tutorial.

Good. It means the GL package installation worked.

No, its landing at same place:
Code: [Select]
make[1]: *** [<builtin>: gl_image.o] Error 1
make[1]: Leaving directory '/home/lsd/r1q2-archive/binaries/ref_gl'
make: *** [Makefile:17: ref_gl] Error 2

Again, you omitted the critical point of error from your "landing at same place".
Yes, make lands at the same place but not necessarily for the same cause.


Quote
anyway  ref_gl its r1ch R1GL or just opengl?

Please read the documentation r1ch provided.
It looks like there is no install and you didn't read the documentation on what to do once you get a successful build.
If there were an install recipe, it will fail if any part of the build failed previously so it's pointless to do it.
I haven't built r1ch's code on Linux for several years, I don't remember all the steps.

The ref_gl code becomes ref_r1gl.dll on Windows, I can only presume that it is ref_gl.so on Linux and it's "r1gl" as stated.

It depends on zlib, libjpeg, libpng so you will need the development libraries for them also.

Missing ANY pieces of the packages on which it depends will "land at same place": make[1] Error 1 or Error 2
you must scroll up to see the actual point of error in order to diagnose the failure. Omitting that error information
from your posts makes it impossible to help you.

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Tofik

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux? R1CH 'ard?
« Reply #8 on: August 02, 2019, 04:41:02 AM »
full paste:
https://pastebin.com/mgqmiKhG
Code: [Select]
../../ref_gl/gl_image.c:724:14: error: dereferencing pointer to incomplete type 'png_info' {aka 'struct png_info_def'}
line 724 from gl_image.c:
Code: [Select]
if (info_ptr->height > MAX_TEXTURE_DIMENSIONS)
{
        png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
ri.FS_FreeFile (PngFileBuffer.Buffer);
ri.Con_Printf (PRINT_ALL, "Oversized PNG file: %s\n", name);
return;
}
second error
Code: [Select]
../../ref_gl/gl_image.c:1523:6: error: conflicting types for 'jpeg_mem_src'
lines from gl_image.c
Code: [Select]
void jpeg_mem_src (j_decompress_ptr cinfo, byte *mem, int len)
{
    cinfo->src = (struct jpeg_source_mgr *)(*cinfo->mem->alloc_small)((j_common_ptr) cinfo, JPOOL_PERMANENT, sizeof(struct jpeg_source_mgr));
    cinfo->src->init_source = jpg_null;
    cinfo->src->fill_input_buffer = jpg_fill_input_buffer;
    cinfo->src->skip_input_data = jpg_skip_input_data;
    cinfo->src->resync_to_restart = jpeg_resync_to_restart;
    cinfo->src->term_source = jpg_null;
    cinfo->src->bytes_in_buffer = len;
    cinfo->src->next_input_byte = mem;
}
errors are related to jpg and png , propably because of new versions of it

libjpeg-dev/disco,now 8c-2ubuntu8 amd64 [installed]
libjpeg-turbo8-dev/disco,now 2.0.1-0ubuntu2 amd64 [installed,automatic]
libjpeg-turbo8/disco,now 2.0.1-0ubuntu2 amd64 [installed,automatic]
libjpeg8-dev/disco,now 8c-2ubuntu8 amd64 [installed,automatic]
libjpeg8/disco,now 8c-2ubuntu8 amd64 [installed,automatic]
libpng-dev/disco,now 1.6.36-6 amd64 [installed]
libpng-tools/disco,now 1.6.36-6 amd64 [installed,automatic]
libpng16-16/disco,now 1.6.36-6 amd64 [installed,automatic]

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: r1q2 how to compile - linux?
« Reply #9 on: August 02, 2019, 09:54:18 AM »
Yep. You need the development libs for libjpeg and libpng.

The first error was because you don't have the header for png file format and its stuctures.
The second error was because you don't have the info for jpeg files.

sudo apt-get update
sudo apt-get upgrade

Then use your package manager to install the development libraries for libjpeg and libpng. These are not just the application libs but they are the libs and headers just like you installed for the OpenGL.

Note: you can generally ignore warnings in the compiler output during make, the r1q2 code is getting a bit old and the compilers complain about usages that used to pass without warning but ERRORS are what you want to watch for and fix their causes.

Once you have updates, I recommend you 'make clean' and 'make'. You don't want old *.o files laying around.


  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 25, 2024, 10:37:09 AM

Login with username, password and session length