Installation fail line 47 on Linux

Started by Joypad, October 07, 2013, 05:11:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joypad

I can't install Bennu on Linux, it give "installation fail" error everytime. I try to install on both TinyCore linux and DSL linux.

On TinyCore Linux 3.7.7 it gives failure on line 62:
Bennu Game Development Installer
(C) 2008-2011 - SplinterGU

Use: /home/tc/bgd-installer.sh --help for help text

Installing Bennu Game Development...
bin/
bin/bgdc
bin/moddesc
bin/bgdi
lib/
lib/libdraw.so
lib/libmod_wm.so
lib/libmod_blendop.so
lib/libmod_screen.so
lib/libmod_math.so
lib/libmod_mathi.so
lib/libmod_crypt.so
lib/libmod_rand.so
lib/libfont.so
lib/libbgdrtm.so
lib/libbgload.so
lib/libmod_joy.so
lib/libmod_effects.so
lib/libmod_sort.so
lib/librender.so
lib/libmod_video.so
lib/libmod_regex.so
lib/libmod_path.so
lib/libmod_map.so
lib/libvideo.so
lib/libmod_grproc.so
lib/libblit.so
lib/libmouse.so
lib/libmod_proc.so
lib/libmod_time.so
lib/libmod_m7.so
lib/libmod_key.so
lib/libmod_draw.so
lib/libkey.so
lib/libmod_text.so
lib/libsdlhandler.so
lib/libmod_timers.so
lib/libmod_cd.so
lib/libwm.so
lib/libgrbase.so
lib/libmod_file.so
lib/libmod_sound.so
lib/libmod_dir.so
lib/libmod_string.so
lib/libmod_debug.so
lib/libjoy.so
lib/libmod_flic.so
lib/libmod_mem.so
lib/libtext.so
lib/libmod_scroll.so
lib/libscroll.so
lib/libmod_say.so
lib/libmod_sys.so
lib/libmod_mouse.so
installation fail

/home/tc/bgd-instaler.sh: line 62: /etc/ld/.so/conf/d/bennugd.conf: No such file or directory


Also get this error on TinyCore when trying to install as root:
root@box:~# bash /home/tc/bgd-installer.sh
Bennu Game Development Installer
(C) 2008-2011 - SplinterGU

Use: /home/tc/bgd-installer.sh --help for help text

Installing Bennu Game Development...
tail: can't open '/root/bdg-installer.sh': No such file or directory
tail: no files
gzip: invaild magic
cp: can't stat '*': No such file or directory
installation fail


I try to install on DSL linux 4.4.6 but it gives failure on line 47:
Bennu Game Development Installer
(C) 2008-2011 - SplinterGU

Use: /home/tc/bgd-installer.sh --help for help text

Installing Bennu Game Development...
bin/
bin/bgdc
bin/moddesc
bin/bgdi
lib/
lib/libdraw.so
lib/libmod_wm.so
lib/libmod_blendop.so
lib/libmod_screen.so
lib/libmod_math.so
lib/libmod_mathi.so
lib/libmod_crypt.so
lib/libmod_rand.so
lib/libfont.so
lib/libbgdrtm.so
lib/libbgload.so
lib/libmod_joy.so
lib/libmod_effects.so
lib/libmod_sort.so
lib/librender.so
lib/libmod_video.so
lib/libmod_regex.so
lib/libmod_path.so
lib/libmod_map.so
lib/libvideo.so
lib/libmod_grproc.so
lib/libblit.so
lib/libmouse.so
lib/libmod_proc.so
lib/libmod_time.so
lib/libmod_m7.so
lib/libmod_key.so
lib/libmod_draw.so
lib/libkey.so
lib/libmod_text.so
lib/libsdlhandler.so
lib/libmod_timers.so
lib/libmod_cd.so
lib/libwm.so
lib/libgrbase.so
lib/libmod_file.so
lib/libmod_sound.so
lib/libmod_dir.so
lib/libmod_string.so
lib/libmod_debug.so
lib/libjoy.so
lib/libmod_flic.so
lib/libmod_mem.so
lib/libtext.so
lib/libmod_scroll.so
lib/libscroll.so
lib/libmod_say.so
lib/libmod_sys.so
lib/libmod_mouse.so
installation fail

bgd-1.0.0-r307-installer.sh: line 47: /etc/profile.d/bennugd.sh: No such file or directory


Bennu seems partially installed so I try to run bgdi and bgdc, it gives this error:

bgdc: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

bgdi: error while loading shared libraries: libbgdrtm.so: cannot open shared object file: No such file or directory


I have tried the methods on the wiki without success:
   export _POSIX2_VERSION=199209
   ./bgd-installer.sh
   unset _POSIX2_VERSION

su (this logs you as the root user, it will ask for root's password, enter it)
   chmod a+x bgd-1.0.0RC7\(r99\)-linux-installer.sh (replace with the version number you downloaded)
   ./bgd-1.0.0RC7\(r99\)-linux-installer.sh (Again, replace with the installer script filename you downloaded)

or, if that fails for you:
   chmod a+x bgd-1.0.0RC7\(r99\)-linux-installer.sh (Replace with the file name you downloaded).
   sudo ./bgd-1.0.0RC7\(r99\)-linux-installer.sh (You might be asked for your password, enter it).


I am without hope of ever installing Bennu :(

Can there be a zip file that I can just extract the needed files like there is with Windows?

handsource-dyko

Have you tried installing it on ubuntu? There should be a pre-made ppa version that works with ubuntu's package manager. I haven't used linux in a while but ubuntu should work. I've never heard of TinyCore and DSL linux, they seem very obscure distro's to me, maybe they have some essential things missing.

Joypad

No, I can't use Ubuntu, the hardware requirements of Ubuntu are much too high for my computer.

DSL and TinyCore linux have nice low hardware requirements and they are Live Boot CD's.

I don't need big CPU requirements, I just need to bdgc function enough to complie the .prg files then I can play the compiled .dcb on my Playstation 2.


handsource-dyko

What kind of hardware are you using? I haved used a pentium 4 with winXP until a two months ago, I finally upgraded to new hardware.
I have used ubuntu on a pentium 4 in the past. (Or is it a special distro for the ps2?)

Joypad

Quote from: SplinterGU on October 07, 2013, 12:01:56 PM
http://forum.bennugd.org/index.php?topic=102.msg56005#msg56005
Thanks for the tip. From examining the files in the tar.gz it creates, I can see that the Bennu install.sh does manage to extract all the lib files afterall. It puts them in /usr/local/share/bennugd/lib. And libcrypto.so.1.0.0 is not included in the install, so it must be required for the Linux distro to have libcrypto.so.1.0.0?

The install script fails on line 47

echo "export PATH=\$PATH:$TARGET_PWD/bin" >/etc/profile.d/bennugd.sh


There isn't a /etc/profile.d/ folder in DSL linux. Maybe this is the problem. So I manually created profile.d folder in DSL linux and this causes the install script to freeze. So I manually copied bennugdinstallscript.sh to that folder. Then manually created the folder from line 62 /etc/ld/.so/conf/d/.

Ran the install script again, this time it created /etc/ld/.so/conf/d/bennugd.conf on its own.

Installing bash autocompletion feature...
Done!


The install script finally completes! So perhaps the problem was the folders on line 47 and 62 didn't exist and I had to manually create them using EmelFM file manager.

However, when I run bgdi and bgdc, I still get the same error messages:

bgdc: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

bgdi: error while loading shared libraries: libbgdrtm.so: cannot open shared object file: No such file or directory


Why can it not find these files? libbgdrtm.so is in the folder /ramdisk/usr/local/share/bennugd/lib. Maybe the fact that it's a Linux live boot CD and the path starts with "ramdisk" means it can't find. So I created a symlink from /ramdisk/usr/local/share/bennugd/lib/libbgdrtm.so to /ramdisk/lib.

Now running bgdi doesn't give any error messages! But it doens't load anything either. Maybe because DSL linux doesn't have something else which is required or my computer not powerful enough.

Now remains the question of why bgdc cannot find libcrypto.so.1.0.0. In the Dingux install, libcrypto.so is present, but in the Linux install script it is not. Does this mean that libcrypto.so.1.0.0 must be provided by the operating system itself?

I look in the folder /KNOPPIX/usr/lib of DSL linux and see libcrypto.so.0.9.7 is present. So maybe this is the problem, the version of libcrypto is too old. With Tinycore linux, the libcrypto file is not present at all.

I decide to trick DSL linux, I create a copy of libcrypto.0.9.7 and rename it to libcrypto.so.1.0.0 then place the copy in /ramdisk/lib

Then I run bgdc .... and it displays the help message! It now works...

I attempt to compile a sample .prg script and it freezes. The mystery deepens. Maybe its due to wrong version of libcrypto. Maybe its due to syntax error in .PRG. Maybe my machine isn't powerful enough. Maybe something else.


Quote from: handsource-dyko on October 07, 2013, 01:47:03 PM
What kind of hardware are you using? I haved used a pentium 4 with winXP until a two months ago, I finally upgraded to new hardware.
I have used ubuntu on a pentium 4 in the past. (Or is it a special distro for the ps2?)
It's a Pentium 2. But that's OK because creating .prg files are just plain text and don't need a powerful CPU to write plain text files. I just need to get BennuGD installed so I can compile the .prg to .dcb and then run the .dcb on my Playstation 2. Or even compile the .prg to a .dcb on the Playstation 2 itself.

handsource-dyko

I don't know if libcrypto is the issue with the freeze, it depends whether you use the library in your program. What exactly happens with freezing? Does bgdi produce an error message, or does a black window appear that does not respond? Have tried running the same prg on another computer? With bennu you must include "imports" to the function libraries that you use, unlike fenix. However, if you forget an include, bgdc will produce an error message that a function is unknown, or something similair.

Joypad

Quote from: handsource-dyko on October 08, 2013, 08:18:37 AM
I don't know if libcrypto is the issue with the freeze, it depends whether you use the library in your program. What exactly happens with freezing? Does bgdi produce an error message, or does a black window appear that does not respond? Have tried running the same prg on another computer? With bennu you must include "imports" to the function libraries that you use, unlike fenix. However, if you forget an include, bgdc will produce an error message that a function is unknown, or something similair.
I tried again the following day and it didn't freeze next time. The compiler works now apart from it saying "libmod_sound" not found. I don't know why this is, it finds all the other imports and libmod_sound.so is in the same folder as all the others.

I gave it the following sample script to test it out. Notice how I had to comment out "import mod_sound" in order to get it to compile successfully.

I aquired temporary access to a Windows machine to test this sample script out on and it works perfectly on Windows, on DSL linux I had to comment out import "mod_sound"; to get it to compile. I then tested the compiled .dcb on the Playstation 2 and got nothing but a blank screen. I tested some other sample scripts too, they all compiled and played perfectly on Windows, but show nothing but a black screen on the PS2! >:(

//this works on windows but not ps2
#ifndef __VERSION__
    import "mod_sdlevthandler";
    import "mod_pathfind";
#else
    import "mod_blendop";
    import "mod_text";
    import "mod_grproc";
    import "mod_video";
    import "mod_map";
    import "mod_screen";
    import "mod_path";
    import "mod_rand";
    import "mod_say";
    import "mod_mouse";
    import "mod_scroll";
    import "mod_math";
#endif

import "mod_m7";
import "mod_proc";
import "mod_key";
import "mod_draw";
import "mod_timers";
//import "mod_sound";
IMPORT "mod_joy";
IMPORT "mod_time"



GLOBAL
option ;
SCR_DEPTH   ;
Process Main()
BEGIN
    set_mode(320,240,SCR_DEPTH, MODE_FULLSCREEN | MODE_DOUBLEBUFFER | MODE_HARDWARE | DOUBLE_BUFFER | HW_SURFACE);
    set_fps (0, 0) ;
    option = 0;
    clear_screen() ;
        write (0, 160,  4, 1, "Bennu tests") ;
    write (0, 160, 14, 1, "hOME MADE bennu test") ;
    write (0, 60,  50, 0, "1. Basic sprite drawing") ;
    write (0, 60,  60, 0, "2. Blending operations") ;
    write (0, 60,  70, 0, "3. Primitive drawing") ;
    write (0, 60,  80, 0, "4. Scroll interactive test") ;
    write (0, 60,  90, 0, "5. Mode 7 interactive test") ;
    write (0, 60, 100, 0, "6. Path-finding interactive test") ;
    write (0, 60, 110, 0, "7. Sound test") ;
    write (0, 60, 150, 0, "0. Exit") ;
   
   
    while(get_timer()<8000)
       // say("Hello World! @" + get_timer());
       
        FRAME;
   
      end
     
     
    REPEAT
   // if (key(_esc)) exit(); end;
   IF key(_0)or JOY_GETBUTTON(0, 0): BREAK ; END
   
   
   
    frame;
    UNTIL option != 0;
END


I included lots of imports because I don't know which ones are needed for which function, the help PDF's and wiki don't mention which imports are needed for each function, so I included them all to avoid mysterious compile errors.

Joypad

Quote from: handsource-dyko on October 08, 2013, 08:18:37 AM
Does bgdi produce an error message, or does a black window appear that does not respond? Have tried running the same prg on another computer?
On DSL linux, bgdi initially gave the error message of "libSDL-Mixer.so not found".

Luckily, DSL linux has an SDL package available, so I installed that. Then bgdi doesn't give any error messages when ran from EmelFM file manager, but does not play the .dcb either.

Compiling the .dcb with debug info on and running the .dcb from the commandline with -d option lists the imported modules being loaded before finally giving the error message segmentation fault.

The same .dcb runs perfectly on Windows.

handsource-dyko

Quote from: Joypad on October 09, 2013, 07:01:53 AM
I included lots of imports because I don't know which ones are needed for which function, the help PDF's and wiki don't mention which imports are needed for each function, so I included them all to avoid mysterious compile errors.



The wiki normally lists a list of modules, with all the functions per module. Unfortunatly, there's an issue with the wiki at the moment. However, with the commandline tool "moddesc" you can get a list of functions per module.



Quote from: Joypad on October 09, 2013, 08:07:12 AM
[size=78%]On DSL linux, bgdi initially gave the error message of "libSDL-Mixer.so not found".[/size]

Luckily, DSL linux has an SDL package available, so I installed that. Then bgdi doesn't give any error messages when ran from EmelFM file manager, but does not play the .dcb either.

Compiling the .dcb with debug info on and running the .dcb from the commandline with -d option lists the imported modules being loaded before finally giving the error message segmentation fault.

The same .dcb runs perfectly on Windows.

[/size]



That's strange, maybe the SDL version is incompatible, bennu for a long time used sdl 1.2, as far as I know the SDL version beeing updated to a newer generation to have better support on mobile platforms, I don't know for sure if that is already in use with the latest binary package.
The playstation 2 port is one of those misc. platforms, it's not a fully supported platform (latests version maybe quite old). Generally, Windows and Linux, Cannoo and GPX2 wiz are the main versions, that get regulair updates.




Joypad

Quote from: handsource-dyko on October 09, 2013, 08:34:40 AM
That's strange, maybe the SDL version is incompatible, bennu for a long time used sdl 1.2, as far as I know the SDL version beeing updated to a newer generation to have better support on mobile platforms, I don't know for sure if that is already in use with the latest binary package.
The playstation 2 port is one of those misc. platforms, it's not a fully supported platform (latests version maybe quite old). Generally, Windows and Linux, Cannoo and GPX2 wiz are the main versions, that get regulair updates.

The SDL version on DSL linux is 1.2.13. The version on Tinycore is different (1.2.0.11.3) and works so I put the Tinycore version onto DSL and then Bennu worked on DSL. :D

So now I have Bennu working on both DSL linux and Tinycore. The problems were as follows:

1) The installer wanted to create files in folders that didn't exist, causing the install fail error messages. Manually creating these folders before running the installer solved this problem.
The folders were:

/etc/profile.d
/etc/ld.so.conf.d
/etc/bash_completion.d
/usr/bin/data

To prevent the error messages the installer should look for the existence of these folders and create them if they don't exist.

2) Running Bennu would produce a libcrypto.so.1.0.0 not found error message. Libcrypto is not part of Bennugd, it must be provided by the operating system. The version of libcrypto on DSL was 0.9.7. Renaming it to libcrypto.1.0.0 solved the error.

Tinycore did not have libcrypto.so, but did have a libcrypt.so. Renaming libcrypt.so to libcrypto.so initially seemed to solve the error messages but then produced unexpected errors later on.  Installing open-ssl.tcz package on Tincore provided libcrypto.so.0.9.8. Renaming it to libcrypto.1.0.0 solved the error messages.

3) libbgdrtm.so not found error message = The installer puts the library files in /usr/lib/bgd/lib and /usr/lib/bgd/module, yet Bennu cannot find these libraries when it is run. Moving the libraries to the /usr/lib folder meant Bennu could find them and no more error messages. Bennu was looking in the wrong folder for the libraries.

4) Compiled scripts would function on Linux and Windows PC, but produce a black screen when running on Playstation 2. This was because they had been compiled with the newest version of Bennu (r307). Downgrading to an older version (r285) of Bennu solved this problem. (not all older versions of Bennu could be installed on DSL linux however, not even after using the advice from this thread).


Quote from: handsource-dyko on October 09, 2013, 08:34:40 AM
The wiki normally lists a list of modules, with all the functions per module. Unfortunatly, there's an issue with the wiki at the moment. However, with the commandline tool "moddesc" you can get a list of functions per module.
Listing functions per module is the wrong way around. When adding a function to my code, I look on the help PDF wiki entry for that function and any imports it requires should be mentioned on the wiki page for that function.