Author Topic: DOWNLOAD: QB64-GL Version 3 [LINUX]  (Read 4631 times)

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
DOWNLOAD: QB64-GL Version 3 [LINUX]
« on: September 29, 2012, 07:24:40 pm »
http://www.qb64.net/qb64v0964-lnx.tar.gz

Please read the release notes for the Windows version and consider these extra issues:

-Sound is not working (I need help to compile the parts/audio/out library using parts/audio/out/os/lnx/build.sh)
It works now!

-Copy & paste don't work (the previous code block (in internal/c/libqb.cpp) referred to SDL so it have to be commented)
If you do want to improve the source code remember to use the purge shell script in internal/c and qb64 will automatically rebuild the missing libraries)

-TCP/IP networking not implemented yet

There are very little (if any) advantages to using QB64-GL for Linux. It is, however, easier to install than before because it does not require you to go searching for specific libraries. The only thing you need to install is 'g++', Linux's standard C++ compiler which is available for (almost) all distros.

Update:
Fyi: When I did I clean install of Bodhi Linux I needed to install the following packages before running setup.sh:

Code: [Select]
g++
mesa-common-dev
libglu1-mesa-dev
« Last Edit: September 30, 2012, 07:22:28 pm by Galleon »
Something old... Something new... Something borrowed... Something blue...

DSMan195276

  • Hero Member
  • *****
  • Posts: 2112
  • Yes
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #1 on: September 29, 2012, 10:58:37 pm »
I'm downloading it right now, woot! Looks great, and I'll see if I can get the audio stuff to compile (Kinda depends on how complicated it is, I haven't taken a look yet)

So I just ran the setup script, and I got an error. But, in somewhat an interesting coincidence I had the same error compiling a package a few days ago. The error;
Code: [Select]
/usr/bin/ld: libqb/os/lnx/libqb_setup.o: undefined reference to symbol 'pthread_create@@GLIBC_2.1'
/usr/bin/ld: note: 'pthread_create@@GLIBC_2.1' is defined in DSO /usr/lib/libpthread.so.0 so try adding it to the linker command line
/usr/lib/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

To fix it, just link pthread with the file (I'm not exactly sure what uses pthread sadly). So, for an exact fix change the compile line for QB64 from:
Code: [Select]
g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -D FREEGLUT_STATIC -o ../../qb64To:
Code: [Select]
g++ -w qbx.cpp libqb/os/lnx/libqb_setup.o parts/video/font/ttf/os/lnx/src.o parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -D FREEGLUT_STATIC -o ../../qb64
I'm running ArchLinux 32-bit which is a rolling release and for the most part has the most up-to-date version of packages compared to all other distros. If this is thanks to a recent update to a package then this error might not show-up in other distros such as Ubuntu, so keep that in mind. It's pretty late right now, but I'll look around tomorrow to see if I can find any specefics on the error and do some testing of it on ArchLinux (And also boot up Ubuntu and Mint which I have installed and compile it on those as well). I'll let you know how it goes with those, and if they have the same problem.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #2 on: September 29, 2012, 11:07:04 pm »
I'll add pthread to the default build line for setup & makeline. It's stock standard for Linux and should be available on all distros supporting g++. It's interesting how different versions of Linux trip up on the tiniest differences. That's why I need testers like you guys! :)
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #3 on: September 29, 2012, 11:50:06 pm »
I've updated the download again, to use -lpthread as requested. I made changes to 'setup.sh' and 'internal/c/makeline_lnx.txt'
Something old... Something new... Something borrowed... Something blue...

DSMan195276

  • Hero Member
  • *****
  • Posts: 2112
  • Yes
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #4 on: September 30, 2012, 01:43:48 am »
Not Suprising I can't sleep, so instead I'll start work on seeing if I can get this stuff working.

First, with the standard install I can compile the welcome.bas. -lpthread needs to be added to the makeline_lnx.txt file though.

And a note, for the 'shebang' on shell scripts you should really use '#!/bin/bash'. '#!/bin/sh' runs bash, but in a sort of compatibility mode of sorts. Basically, not all bash script will work if you use sh.

Second, for the purge_precompiled_content.sh, I forgot to mention that you need "./" before all the filenames so that it knows to look in the current directory. I think some distros (Ubuntu in particular) allow you to specify things in the current directory without the "./" but that's not standard behaviour. (Edit: I think this is true. I realized later a majority of the errors from the rm command were because the windows files were not there to be removed, sorry about that. Either way this change should prevent that error from happening if it were to ever happen on a distro)
Here is the edited purge file:
Code: [Select]
#!/bin/sh

rm ./libqb/os/win/*.o
rm ./libqb/os/lnx/*.o

rm ./parts/core/os/win/src.a
rm ./parts/core/os/lnx/src.a
rm ./parts/core/os/win/temp/*.o
rm ./parts/core/os/lnx/temp/*.o

rm ./parts/audio/decode/mp3/os/win/src.a
rm ./parts/audio/decode/mp3/os/lnx/src.a
rm ./parts/audio/decode/mp3/os/win/temp/*.o
rm ./parts/audio/decode/mp3/os/lnx/temp/*.o

rm ./parts/audio/decode/ogg/os/win/src.o
rm ./parts/audio/decode/ogg/os/lnx/src.o
rm ./parts/audio/decode/ogg/os/win/temp/*.o
rm ./parts/audio/decode/ogg/os/lnx/temp/*.o

rm ./parts/audio/conversion/os/win/src.a
rm ./parts/audio/conversion/os/lnx/src.a
rm ./parts/audio/conversion/os/win/temp/*.o
rm ./parts/audio/conversion/os/lnx/temp/*.o

rm ./parts/audio/out/os/win/src.a
rm ./parts/audio/out/os/lnx/src.a
rm ./parts/audio/out/os/win/temp/*.o
rm ./parts/audio/out/os/lnx/temp/*.o

rm ./parts/video/font/ttf/os/win/src.o
rm ./parts/video/font/ttf/os/lnx/src.o

Side note, is there any way to compile all of the libs again just with a script, or using qb64 the only way?

--- NOTE: You might want to skip or just skim over a lot of this. It was mostly me just documenting my failed attempts to get the audio working. I recapped what all I tried at the end.

I also took a stab at the build.sh for audio and... It worked? Lol not sure what to tell you, but it appeared to work (the src.a file was created as it said it should be), I did get an error from the "temp/helpers.o" line but that was after all the compiling was done. What exactly is the temp/helpers.o file? I couldn't figure out why it was there. I commented out what you had wrote and added '#!/bin/bash' to the top and then ran it. Of course, when linking to src.a I got a list of errors. So I went back to the source for openAL to figure out the problem. First, I realize for config.h that's system dependent, and more importantly distro dependent since not all distros use the same audio stuff. The most common is the combo of ALSA and PulseAudio but the distro may either have more options or be using something else like OSS. I found that if I went into the openal-soft-1.14 directory in the download directory, and then (from what it said in the readme) run "cmake .." from inside the build directory. From doing this it created a config.h file tailored for my specific system. I think that running this in setup.sh to build the config.h file is probably the best idea, shell scripts could then be used to modify the created config.h to be like the one that's currently in the src directory (With the extra window's declares and such. With that noted, here is the config.h that my system generated:
Code: [Select]
/* API declaration export attribute */
#define AL_API  __attribute__((visibility("protected")))
#define ALC_API __attribute__((visibility("protected")))

/* Define to the library version */
#define ALSOFT_VERSION "1.14"

/* Define if we have the ALSA backend */
#define HAVE_ALSA

/* Define if we have the OSS backend */
#define HAVE_OSS

/* Define if we have the Solaris backend */
/* #undef HAVE_SOLARIS */

/* Define if we have the SndIO backend */
/* #undef HAVE_SNDIO */

/* Define if we have the MMDevApi backend */
/* #undef HAVE_MMDEVAPI */

/* Define if we have the DSound backend */
/* #undef HAVE_DSOUND */

/* Define if we have the Windows Multimedia backend */
/* #undef HAVE_WINMM */

/* Define if we have the PortAudio backend */
#define HAVE_PORTAUDIO

/* Define if we have the PulseAudio backend */
#define HAVE_PULSEAUDIO

/* Define if we have the CoreAudio backend */
/* #undef HAVE_COREAUDIO */

/* Define if we have the OpenSL backend */
/* #undef HAVE_OPENSL */

/* Define if we have the Wave Writer backend */
#define HAVE_WAVE

/* Define if we have dlfcn.h */
#define HAVE_DLFCN_H

/* Define if we have the stat function */
#define HAVE_STAT

/* Define if we have the powf function */
#define HAVE_POWF

/* Define if we have the sqrtf function */
#define HAVE_SQRTF

/* Define if we have the cosf function */
#define HAVE_COSF

/* Define if we have the sinf function */
#define HAVE_SINF

/* Define if we have the acosf function */
#define HAVE_ACOSF

/* Define if we have the asinf function */
#define HAVE_ASINF

/* Define if we have the atanf function */
#define HAVE_ATANF

/* Define if we have the atan2f function */
#define HAVE_ATAN2F

/* Define if we have the fabsf function */
#define HAVE_FABSF

/* Define if we have the log10f function */
#define HAVE_LOG10F

/* Define if we have the floorf function */
#define HAVE_FLOORF

/* Define if we have the strtof function */
#define HAVE_STRTOF

/* Define if we have stdint.h */
#define HAVE_STDINT_H

/* Define if we have the __int64 type */
/* #undef HAVE___INT64 */

/* Define to the size of a long int type */
#define SIZEOF_LONG 4

/* Define to the size of a long long int type */
#define SIZEOF_LONG_LONG 8

/* Define if we have GCC's destructor attribute */
#define HAVE_GCC_DESTRUCTOR

/* Define if we have GCC's format attribute */
#define HAVE_GCC_FORMAT

/* Define if we have pthread_np.h */
/* #undef HAVE_PTHREAD_NP_H */

/* Define if we have arm_neon.h */
/* #undef HAVE_ARM_NEON_H */

/* Define if we have guiddef.h */
/* #undef HAVE_GUIDDEF_H */

/* Define if we have guiddef.h */
/* #undef HAVE_INITGUID_H */

/* Define if we have ieeefp.h */
/* #undef HAVE_IEEEFP_H */

/* Define if we have float.h */
#define HAVE_FLOAT_H

/* Define if we have fpu_control.h */
#define HAVE_FPU_CONTROL_H

/* Define if we have fenv.h */
#define HAVE_FENV_H

/* Define if we have fesetround() */
#define HAVE_FESETROUND

/* Define if we have _controlfp() */
/* #undef HAVE__CONTROLFP */

/* Define if we have pthread_setschedparam() */
#define HAVE_PTHREAD_SETSCHEDPARAM

/* Define if we have the restrict keyword */
/* #undef HAVE_RESTRICT */

/* Define if we have the __restrict keyword */
#define HAVE___RESTRICT

With that in mind, I just noted which of the audio defines my system was using (ALSA, OSS, PULSEAUDIO, PORTAUDIO), and then went and edited the config.h in ./src to match those (And comment out which ones I don't need.). For me, that equated to changing HAVE_PULSEAUDIO to a define, and the same for portaudio. After making that change to the config.h, I recompiled the src.a and tested it. Not surprisingly I got the same errors. A lot of them are undefined reference errors (Infact all of them).

So I went back to recompile all the libs using QB64 and I got a strange compiler reference error when it started building libraries, and after I got the reference error QB64 had a file opening error and crashed. I managed to remedy the problem by running the build.sh file in the audio/out/os/lnx/ by hand though, I'm guess it's was just a file permission error. Moving on, once it started compiling the same reference errors happened again. I went into qbx.cpp and uncommented the openal stuff that you had commented (I figured it was worth a sort). Same reference errors. And this was about the point where I realized I forgot to add the src.a file to the makeline_lnx.txt file. Adding it changed nothing though, same reference errors. At this point, I realized it's 4 AM and I'm getting up for church in the morning so I better head to bed.

--Recap of what I did:
 -- Small edit to the build.sh file (Added '#!/bin/bash', commented out everything that you put at the top, removed the 'temp/headers.o' line).
 -- In the config.h I change the pulseaudio define so that it was '#define' not '#undef' (I have pulseaudio installed and running).
 -- I tested build.sh and it ran and produced the src.a file as expected. I would assume that in itself is a good sign.
 -- QB64 still failed to compile a basic program using _SNDRAW
 -- tried various attempts to make it compile (Adding src.a to makeline, make changes in config.h). None of them worked.

Somehow I get the feeling that either my src.a file is messed up (Has a linking problem or something) or I'm not doing something that's required to get QB64 to correctly recognize how to link the src.a. Perhaps you know how to fix this problem. Here is the entire error list (Probably somewhat useless, but I'm including it anyway in the off chance that it tells you what's wrong):
Code: [Select]
qbx.cpp:(.text+0x228a): undefined reference to `func__sndrate()'
qbx.cpp:(.text+0x2480): undefined reference to `func__sndrawlen()'
parts/audio/out/os/lnx/src.a(ALc.o): In function `LockUIntMapRead':
ALc.c:(.text+0x75): undefined reference to `ReadLock'
parts/audio/out/os/lnx/src.a(ALc.o): In function `UnlockUIntMapRead':
ALc.c:(.text+0x8b): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(ALc.o): In function `LockDevice':
ALc.c:(.text+0x11a): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `UnlockDevice':
ALc.c:(.text+0x130): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alc_init':
ALc.c:(.text+0x313): undefined reference to `InitializeCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alc_deinit_safe':
ALc.c:(.text+0x340): undefined reference to `DeleteCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alc_initconfig':
ALc.c:(.text+0x4c0): undefined reference to `al_print'
ALc.c:(.text+0x601): undefined reference to `al_print'
ALc.c:(.text+0xb56): undefined reference to `al_print'
ALc.c:(.text+0xb92): undefined reference to `al_print'
ALc.c:(.text+0xc7b): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o):ALc.c:(.text+0xd65): more undefined references to `al_print' follow
parts/audio/out/os/lnx/src.a(ALc.o): In function `LockLists':
ALc.c:(.text+0xf2a): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `UnlockLists':
ALc.c:(.text+0xf3e): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `AppendList':
ALc.c:(.text+0x1070): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `UpdateDeviceParams':
ALc.c:(.text+0x173d): undefined reference to `al_print'
ALc.c:(.text+0x1949): undefined reference to `al_print'
ALc.c:(.text+0x1d58): undefined reference to `al_print'
ALc.c:(.text+0x1dd5): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o):ALc.c:(.text+0x1e47): more undefined references to `al_print' follow
parts/audio/out/os/lnx/src.a(ALc.o): In function `FreeDevice':
ALc.c:(.text+0x25cf): undefined reference to `ResetUIntMap'
ALc.c:(.text+0x2608): undefined reference to `al_print'
ALc.c:(.text+0x2621): undefined reference to `ResetUIntMap'
ALc.c:(.text+0x2660): undefined reference to `al_print'
ALc.c:(.text+0x267b): undefined reference to `ResetUIntMap'
ALc.c:(.text+0x26bf): undefined reference to `DeleteCriticalSection'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ALCdevice_IncRef':
ALc.c:(.text+0x270c): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ALCdevice_DecRef':
ALc.c:(.text+0x274e): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `InitContext':
ALc.c:(.text+0x28f1): undefined reference to `InitUIntMap'
ALc.c:(.text+0x2912): undefined reference to `InitUIntMap'
parts/audio/out/os/lnx/src.a(ALc.o): In function `FreeContext':
ALc.c:(.text+0x299e): undefined reference to `al_print'
ALc.c:(.text+0x29dc): undefined reference to `al_print'
ALc.c:(.text+0x29f5): undefined reference to `ResetUIntMap'
ALc.c:(.text+0x2a33): undefined reference to `al_print'
ALc.c:(.text+0x2a4e): undefined reference to `ResetUIntMap'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ReleaseContext':
ALc.c:(.text+0x2b41): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ALCcontext_IncRef':
ALc.c:(.text+0x2c37): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ALCcontext_DecRef':
ALc.c:(.text+0x2c79): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ReleaseThreadCtx':
ALc.c:(.text+0x2cb7): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alcCaptureOpenDevice':
ALc.c:(.text+0x2ea6): undefined reference to `InitializeCriticalSection'
ALc.c:(.text+0x2ebc): undefined reference to `InitUIntMap'
ALc.c:(.text+0x2ed2): undefined reference to `InitUIntMap'
ALc.c:(.text+0x2eea): undefined reference to `InitUIntMap'
ALc.c:(.text+0x2f5c): undefined reference to `DeleteCriticalSection'
ALc.c:(.text+0x2fd4): undefined reference to `DeleteCriticalSection'
ALc.c:(.text+0x3056): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alcCreateContext':
ALc.c:(.text+0x40fa): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alcOpenDevice':
ALc.c:(.text+0x4413): undefined reference to `InitializeCriticalSection'
ALc.c:(.text+0x448f): undefined reference to `InitUIntMap'
ALc.c:(.text+0x44a5): undefined reference to `InitUIntMap'
ALc.c:(.text+0x44bd): undefined reference to `InitUIntMap'
ALc.c:(.text+0x45a7): undefined reference to `al_print'
ALc.c:(.text+0x465f): undefined reference to `al_print'
ALc.c:(.text+0x46b4): undefined reference to `al_print'
ALc.c:(.text+0x478c): undefined reference to `al_print'
ALc.c:(.text+0x4801): undefined reference to `al_print'
ALc.c:(.text+0x49b1): undefined reference to `DeleteCriticalSection'
ALc.c:(.text+0x4a40): undefined reference to `al_print'
ALc.c:(.text+0x4ab5): undefined reference to `al_print'
ALc.c:(.text+0x4b17): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alcCloseDevice':
ALc.c:(.text+0x4bc6): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `alcLoopbackOpenDeviceSOFT':
ALc.c:(.text+0x4d10): undefined reference to `InitializeCriticalSection'
ALc.c:(.text+0x4d8c): undefined reference to `InitUIntMap'
ALc.c:(.text+0x4da2): undefined reference to `InitUIntMap'
ALc.c:(.text+0x4dba): undefined reference to `InitUIntMap'
ALc.c:(.text+0x4f14): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o): In function `ReleaseALC':
ALc.c:(.text+0x5149): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x4): undefined reference to `alc_pulse_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x8): undefined reference to `alc_pulse_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xc): undefined reference to `alc_pulse_probe'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x40): undefined reference to `alc_alsa_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x44): undefined reference to `alc_alsa_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x48): undefined reference to `alc_alsa_probe'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x7c): undefined reference to `alc_oss_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x80): undefined reference to `alc_oss_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x84): undefined reference to `alc_oss_probe'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xb8): undefined reference to `alc_pa_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xbc): undefined reference to `alc_pa_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xc0): undefined reference to `alc_pa_probe'
parts/audio/out/os/lnx/src.a(alThunk.o): In function `ThunkInit':
alThunk.c:(.text+0x1d): undefined reference to `RWLockInit'
parts/audio/out/os/lnx/src.a(alThunk.o): In function `NewThunkEntry':
alThunk.c:(.text+0x81): undefined reference to `ReadLock'
alThunk.c:(.text+0xb7): undefined reference to `ReadUnlock'
alThunk.c:(.text+0xe6): undefined reference to `ReadUnlock'
alThunk.c:(.text+0xf2): undefined reference to `WriteLock'
alThunk.c:(.text+0x124): undefined reference to `WriteUnlock'
alThunk.c:(.text+0x14c): undefined reference to `al_print'
alThunk.c:(.text+0x1b7): undefined reference to `WriteUnlock'
parts/audio/out/os/lnx/src.a(alThunk.o): In function `FreeThunkEntry':
alThunk.c:(.text+0x1db): undefined reference to `ReadLock'
alThunk.c:(.text+0x217): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alState.o): In function `LockUIntMapRead':
alState.c:(.text+0x1f): undefined reference to `ReadLock'
parts/audio/out/os/lnx/src.a(alState.o): In function `UnlockUIntMapRead':
alState.c:(.text+0x35): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alState.o): In function `LockDevice':
alState.c:(.text+0x7d): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(alState.o): In function `UnlockDevice':
alState.c:(.text+0x93): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(alSource.o): In function `LockDevice':
alSource.c:(.text+0x51): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(alSource.o): In function `UnlockDevice':
alSource.c:(.text+0x67): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alGenSources':
alSource.c:(.text+0x1a2): undefined reference to `InsertUIntMapEntry'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alDeleteSources':
alSource.c:(.text+0x2a4): undefined reference to `LookupUIntMapKey'
alSource.c:(.text+0x2ff): undefined reference to `RemoveUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alIsSource':
alSource.c:(.text+0x4bc): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourcef':
alSource.c:(.text+0x502): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSource3f':
alSource.c:(.text+0xb52): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourcefv':
alSource.c:(.text+0xe25): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourcei':
alSource.c:(.text+0xed7): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o):alSource.c:(.text+0x1051): more undefined references to `LookupUIntMapKey' follow
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourcei':
alSource.c:(.text+0x10f2): undefined reference to `ReadLock'
alSource.c:(.text+0x112e): undefined reference to `ReadUnlock'
alSource.c:(.text+0x1301): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSource3i':
alSource.c:(.text+0x15a8): undefined reference to `LookupUIntMapKey'
alSource.c:(.text+0x1617): undefined reference to `LookupUIntMapKey'
alSource.c:(.text+0x1642): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourceiv':
alSource.c:(.text+0x18cb): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alSource.o):alSource.c:(.text+0x1953): more undefined references to `LookupUIntMapKey' follow
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourceQueueBuffers':
alSource.c:(.text+0x305e): undefined reference to `ReadLock'
alSource.c:(.text+0x310e): undefined reference to `ReadUnlock'
alSource.c:(.text+0x313f): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alSource.o): In function `alSourceUnqueueBuffers':
alSource.c:(.text+0x3270): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alListener.o): In function `LockDevice':
alListener.c:(.text+0x136): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(alListener.o): In function `UnlockDevice':
alListener.c:(.text+0x14c): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alGenFilters':
alFilter.c:(.text+0x111): undefined reference to `InsertUIntMapEntry'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alDeleteFilters':
alFilter.c:(.text+0x231): undefined reference to `LookupUIntMapKey'
alFilter.c:(.text+0x28d): undefined reference to `RemoveUIntMapKey'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alIsFilter':
alFilter.c:(.text+0x328): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alFilteri':
alFilter.c:(.text+0x388): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alFilteriv':
alFilter.c:(.text+0x47b): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alFilterf':
alFilter.c:(.text+0x504): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alFilter.o): In function `alFilterfv':
alFilter.c:(.text+0x58d): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alFilter.o):alFilter.c:(.text+0x61a): more undefined references to `LookupUIntMapKey' follow
parts/audio/out/os/lnx/src.a(alEffect.o): In function `LockDevice':
alEffect.c:(.text+0x10): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `UnlockDevice':
alEffect.c:(.text+0x26): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alGenEffects':
alEffect.c:(.text+0x154): undefined reference to `InsertUIntMapEntry'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alDeleteEffects':
alEffect.c:(.text+0x277): undefined reference to `LookupUIntMapKey'
alEffect.c:(.text+0x2d0): undefined reference to `RemoveUIntMapKey'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alIsEffect':
alEffect.c:(.text+0x36b): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alEffecti':
alEffect.c:(.text+0x3c8): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alEffectiv':
alEffect.c:(.text+0x4ed): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alEffectf':
alEffect.c:(.text+0x576): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alEffect.o): In function `alEffectfv':
alEffect.c:(.text+0x5ff): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alEffect.o):alEffect.c:(.text+0x68c): more undefined references to `LookupUIntMapKey' follow
parts/audio/out/os/lnx/src.a(alEffect.o): In function `LoadReverbPreset':
alEffect.c:(.text+0x255f): undefined reference to `al_print'
alEffect.c:(.text+0x261d): undefined reference to `al_print'
alEffect.c:(.text+0x27b5): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGenBuffers':
alBuffer.c:(.text+0x146): undefined reference to `RWLockInit'
alBuffer.c:(.text+0x17c): undefined reference to `InsertUIntMapEntry'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alDeleteBuffers':
alBuffer.c:(.text+0x29c): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0x324): undefined reference to `RemoveUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alIsBuffer':
alBuffer.c:(.text+0x3c9): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferData':
alBuffer.c:(.text+0x428): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferSubDataSOFT':
alBuffer.c:(.text+0x893): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0x927): undefined reference to `WriteLock'
alBuffer.c:(.text+0xaf3): undefined reference to `WriteUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferSamplesSOFT':
alBuffer.c:(.text+0xb3e): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferSubSamplesSOFT':
alBuffer.c:(.text+0xc59): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0xcdf): undefined reference to `WriteLock'
alBuffer.c:(.text+0xda5): undefined reference to `WriteUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBufferSamplesSOFT':
alBuffer.c:(.text+0xdf5): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0xe7b): undefined reference to `ReadLock'
alBuffer.c:(.text+0xf8b): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferf':
alBuffer.c:(.text+0x101d): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBuffer3f':
alBuffer.c:(.text+0x108f): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferfv':
alBuffer.c:(.text+0x111c): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferi':
alBuffer.c:(.text+0x118e): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBuffer3i':
alBuffer.c:(.text+0x1200): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o):alBuffer.c:(.text+0x1294): more undefined references to `LookupUIntMapKey' follow
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alBufferiv':
alBuffer.c:(.text+0x12d1): undefined reference to `WriteLock'
alBuffer.c:(.text+0x1356): undefined reference to `WriteUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBufferf':
alBuffer.c:(.text+0x13d3): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0x1409): undefined reference to `ReadLock'
alBuffer.c:(.text+0x144c): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBuffer3f':
alBuffer.c:(.text+0x14d2): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBufferfv':
alBuffer.c:(.text+0x1587): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBufferi':
alBuffer.c:(.text+0x161c): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0x16ac): undefined reference to `ReadLock'
alBuffer.c:(.text+0x16e4): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBuffer3i':
alBuffer.c:(.text+0x1795): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `alGetBufferiv':
alBuffer.c:(.text+0x186b): undefined reference to `LookupUIntMapKey'
alBuffer.c:(.text+0x18a1): undefined reference to `ReadLock'
alBuffer.c:(.text+0x18c8): undefined reference to `ReadUnlock'
parts/audio/out/os/lnx/src.a(alBuffer.o): In function `LoadData':
alBuffer.c:(.text+0x98b5): undefined reference to `WriteLock'
alBuffer.c:(.text+0x98cd): undefined reference to `WriteUnlock'
alBuffer.c:(.text+0x990e): undefined reference to `WriteUnlock'
alBuffer.c:(.text+0x9a4f): undefined reference to `WriteUnlock'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `LockDevice':
alAuxEffectSlot.c:(.text+0x51): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `UnlockDevice':
alAuxEffectSlot.c:(.text+0x67): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `alGenAuxiliaryEffectSlots':
alAuxEffectSlot.c:(.text+0x222): undefined reference to `InsertUIntMapEntry'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `alDeleteAuxiliaryEffectSlots':
alAuxEffectSlot.c:(.text+0x337): undefined reference to `LookupUIntMapKey'
alAuxEffectSlot.c:(.text+0x3c3): undefined reference to `RemoveUIntMapKey'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `alIsAuxiliaryEffectSlot':
alAuxEffectSlot.c:(.text+0x484): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `alAuxiliaryEffectSloti':
alAuxEffectSlot.c:(.text+0x4d9): undefined reference to `LookupUIntMapKey'
alAuxEffectSlot.c:(.text+0x51e): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `alAuxiliaryEffectSlotiv':
alAuxEffectSlot.c:(.text+0x650): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o): In function `alAuxiliaryEffectSlotf':
alAuxEffectSlot.c:(.text+0x6bc): undefined reference to `LookupUIntMapKey'
parts/audio/out/os/lnx/src.a(alAuxEffectSlot.o):alAuxEffectSlot.c:(.text+0x7a1): more undefined references to `LookupUIntMapKey' follow
parts/audio/out/os/lnx/src.a(null.o): In function `NullProc':
null.c:(.text+0x74): undefined reference to `timeGetTime'
null.c:(.text+0x81): undefined reference to `timeGetTime'
null.c:(.text+0x16e): undefined reference to `Sleep'
parts/audio/out/os/lnx/src.a(panning.o): In function `SetSpeakerArrangement':
panning.c:(.text+0x107): undefined reference to `al_print'
panning.c:(.text+0x349): undefined reference to `al_print'
panning.c:(.text+0x428): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(hrtf.o): In function `GetHrtf':
hrtf.c:(.text+0x1079): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(hrtf.o): In function `InitHrtf':
hrtf.c:(.text+0x11a2): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(hrtf.o):hrtf.c:(.text+0x11e6): more undefined references to `al_print' follow
parts/audio/out/os/lnx/src.a(ALu.o): In function `LockDevice':
ALu.c:(.text+0x1a8): undefined reference to `EnterCriticalSection'
parts/audio/out/os/lnx/src.a(ALu.o): In function `UnlockDevice':
ALu.c:(.text+0x1be): undefined reference to `LeaveCriticalSection'
parts/audio/out/os/lnx/src.a(alcReverb.o): In function `AllocLines':
alcReverb.c:(.text+0x12d5): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(alcConfig.o): In function `LoadConfigFromFile':
alcConfig.c:(.text+0x10c): undefined reference to `al_print'
alcConfig.c:(.text+0x191): undefined reference to `al_print'
alcConfig.c:(.text+0x221): undefined reference to `al_print'
alcConfig.c:(.text+0x28c): undefined reference to `al_print'
parts/audio/out/os/lnx/src.a(alcConfig.o):alcConfig.c:(.text+0x30e): more undefined references to `al_print' follow
collect2: error: ld returned 1 exit status

Also, I think that the ./setup.sh and QB64 should check for the existence of system-wide versions the libraries that QB64 is currently static compiling, and if they already exist then QB64 should link against the system-wide installed libraries instead of the static ones. If this was implemented then it would fix lots of possible errors in the future. The chances are, most distros will have slightly modified versions of these libraries that are better tailored to work well for the specific system setup, and when it's an option using those modified libraries should be preferred over static compiling (Where the vanilla version of the library might not even compile on the distro for one reason or another). These libraries, like openal, are also fairly common and many people probably already have them installed (I had openal installed before trying out QB64-GL for example) and the installed version will almost certainly work better then the static version we have in here. Just a thought.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #5 on: September 30, 2012, 04:25:14 am »
Thanks DSMan195276!

I read your whole post and I think you were very close to success. I have a feeling the correct .c files aren't being included in src.a, and I'll certainly be using your header as a basis for a more generic Linux one, as you say using ALSA.

The problem with distro-specific builds is I really cannot vouch for the code in them, or make changes to it if our community requests it (short of signing on as a developer of each library and waiting for the release cycle!). I have other concerns which relate to how distros evolve and require changes to our code because their devs decided to take things in a different direction. There are some things, however, which warrant distro-specific libraries, like sound, because it interfaces with hardware.

Thanks for all your hard work.
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #6 on: September 30, 2012, 05:37:09 am »
I got helpers.c to compile with this tip:
http://sourceware.org/ml/libc-alpha/2008-03/msg00028.html
And _SNDRAW now works!
I'll chuck out everything which we don't need from src.a and make sure the 32/64-bit variables will be set appropriately (at least for x86 processors...)
Something old... Something new... Something borrowed... Something blue...

DSMan195276

  • Hero Member
  • *****
  • Posts: 2112
  • Yes
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #7 on: September 30, 2012, 09:31:47 am »
I agree, there is somewhat of a grey area for where you should static compile or not static compile on Linux. I think it might be best to go with the system libraries for sound though, just because then you won't have to wonder whether the system is using ALSA, PulseAudio on top of ALSA, OSS, Portaudio (I don't even remember what that one does...). Currently, no distros that I know of are using OSS by default, and all of them use PulseAudio on top of ALSA. From my understanding, basically PulseAudio acts like a program interfacing with ALSA and a fake soundcard to ALSA. Normally, ALSA controls everything and ALSA can only play one sound at a time. So, if say you're playing music and then you get a message notification sound, the music will stop playing for the duration of the message notification. PulseAudio basically remedy's this by sitting on top of ALSA and mixing sounds from different programs together and then sending the result to ALSA for it to play. In general, ALSA is a good bet. The best option would really be to make it configurable within QB64. Skype for instance allows you to choose what audio you use (ALSA, Pulse, OSS, etc.). I don't know to much about how that works and if OpenAL even has that option though. And of course Skype is closed source. I do know of a few programs that do it that are open source so it might be worth taking a look.

If we still want to static compile, then perhaps if in ./setup.sh we could check what sound systems are in use and then configure it accordingly. I don't think that should be more of an issue of just checking if the executables for ALSA/Pulseaudio/etc. are there and then modifying the #define statements accordingly, I could help you write this shell script if needed, I've done this type of thing before in bash script.

And now I see what I missed. And I kinda feel somewhat stupid since I had been wondering why the helpers.o file was compiled down at the bottom of the build.sh and was never used. Now all those reference errors and such make sense, adding helpers.o to the ar line fixes all those problems. then a got a few compiling errors, it doesn't look like I got the same compiling errors you did though. I got errors there were basically the same as the pthread error from before. Adding "-ldl" and "-lrt" fixed the problem. But, once that was done I'm still getting errors with undefined references to the sound initing stuff, specifically:
Code: [Select]
arts/audio/out/os/lnx/src.a(ALc.o):(.data+0x4): undefined reference to `alc_pulse_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x8): undefined reference to `alc_pulse_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xc): undefined reference to `alc_pulse_probe'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x40): undefined reference to `alc_alsa_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x44): undefined reference to `alc_alsa_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x48): undefined reference to `alc_alsa_probe'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x7c): undefined reference to `alc_oss_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x80): undefined reference to `alc_oss_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0x84): undefined reference to `alc_oss_probe'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xb8): undefined reference to `alc_pa_init'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xbc): undefined reference to `alc_pa_deinit'
parts/audio/out/os/lnx/src.a(ALc.o):(.data+0xc0): undefined reference to `alc_pa_probe'

I think that part of this is just from my messing with QB64-GL so much. I'm going to do a second install later today and redo what worked for you and then see if it'll compile correctly.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #8 on: September 30, 2012, 03:09:49 pm »
Here's an updated copy of audio out. You'll want to run build.sh because I doubt my binary will work... but you never know! QB64 is also able to rebuild this automatically (if you purge it first).
http://www.qb64.net/internal_c_parts_audio_out.tar.gz

Now we need to get the conversion library to compile, should be much easier.
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #9 on: September 30, 2012, 03:32:12 pm »
Quote
Now we need to get the conversion library to compile, should be much easier.
It compiled so it should be fine. Again I had to edit config.h which was mostly filled with useful lines like:
Code: [Select]
#define HAVE_MALLOCI've got news for everyone, if malloc isn't there QB64 has no chance of running!
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #10 on: September 30, 2012, 04:24:36 pm »
I've now got .OGG files and .WAV files decoding and playing. Just need to work on the mp3 decoder build line a little more and the Linux version will have exactly the same sound capabilities as the Windows version. After that I'll update the download so you can all use sound in Linux.
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #11 on: September 30, 2012, 05:07:40 pm »
***DOWNLOAD UPDATED***
QB64 for Linux will now play MP3(layer 2&3 only), OGG and WAV(uncompressed) sound files.
Be sure to do a fresh install (don't just copy files over your existing folder, it won't work).

I couldn't test 3D 5.1 directional sound because I tested in Oracle VirtualBox (distant sounds were quieter and sound from the left used left speaker so I can only assume OpenAL is doing its best), maybe someone with a proper Linux rig could tell me if it works.
Something old... Something new... Something borrowed... Something blue...

DSMan195276

  • Hero Member
  • *****
  • Posts: 2112
  • Yes
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #12 on: September 30, 2012, 05:38:33 pm »
In theory, statically compiled binaries on Linux *should* be runnable on any Linux distro. For examples you could take a look at unetbootin which is a Qt program that is distributed in binary form. With that in mind, Unetbootin has a much simpler task and doesn't have all the extra libs that QB64 does. But if it's statically compiled that should mean it's for the most part portable across all Linux systems. Galleon, if you wouldn't mind testing this by trying to use my qb64 binary compiled on Arch in Ubuntu:

https://www.dropbox.com/s/7r3v7n3rsn1rwf5/qb64

If that works, then that means you could actually distribute a QB64 executable on Linux and users could avoid all the normal compiling steps that happen. Surprisingly the static compiled version isn't that much bigger then the SDL version. QB64-GL weighs in at 5 MB on my system, and QB64-SDL is 3.8MB.

Also I just downloaded the new version of QB64-GL and compiled. Everything went smoothly. I then compiled a test _SNDRAW program to test sound. It failed to compile sadly. I had to change my makeline to "g++ -w qbx.cpp parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o", adding "-ldr -lrt". The errors were the same as the one caused by pthread. I think when Glibc was updated to 2.1, some of the libraries were split, that's my best guess anyway. Using your static lib also seemed to be no problem. The errors I get are:

Code: [Select]
/tmp/ccZmGZEF.o: In function `QBMAIN(void*)':
qbx.cpp:(.text+0x228a): undefined reference to `func__sndrate()'
qbx.cpp:(.text+0x2480): undefined reference to `func__sndrawlen()'
collect2: error: ld returned 1 exit status

So, I guess the sound library functions just aren't being linked for some reason? Any idea why?

-- Also, right now I'm going to reboot into my Linux Mint and XUbuntu/Ubuntu installs and test out QB64-GL. I'll let you know how it goes for me.

Matt
"Cast your cares on the Lord and he will sustain you; he will never let the righteous be shaken" -- Psalm 55:22
QB64 Linux Installer

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #13 on: September 30, 2012, 07:13:56 pm »
Quote
I had to change my makeline to "g++ -w qbx.cpp parts/core/os/lnx/src.a -lGL -lGLU -lX11 -lpthread -ldl -lrt -D FREEGLUT_STATIC -o", adding "-ldr -lrt". The errors were the same as the one caused by pthread.
Unusual, I guess I could add those too...

Quote
qbx.cpp:(.text+0x228a): undefined reference to `func__sndrate()'
qbx.cpp:(.text+0x2480): undefined reference to `func__sndrawlen()'
Sorry!  :o That's because these aren't implemented yet! I got caught up with the sound decoding pipeline work. Just use _SNDRAW and assume a rate of 44100 for now.
« Last Edit: September 30, 2012, 07:19:32 pm by Galleon »
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5484
  • QB Forever
Re: DOWNLOAD: QB64-GL Version 3 [LINUX]
« Reply #14 on: September 30, 2012, 07:31:57 pm »
I updated the download to use -ldl and -lrt as well. Now it's 0964.

I tried your binary to see what would happen. It didn't work. I'm not surprised really... different architecture? different distro version? different C/C++ runtime[I could statically link those but I don't yet]?
All in all I don't see much advantage in distributing Linux binaries.
« Last Edit: September 30, 2012, 07:37:10 pm by Galleon »
Something old... Something new... Something borrowed... Something blue...