Opened 9 years ago

Closed 8 years ago

#10 closed defect (fixed)

Port configure

Reported by: dmik Owned by: Valery V. Sedletski
Priority: critical Milestone: VBox driver
Component: Common Tasks Keywords:
Cc:

Description (last modified by dmik)

We need configure to fully work on OS/2 so that the project could be easily built on any RPM-enabled machine.

Attachments (5)

AutoConfig.kmk (4.4 KB) - added by Valery V. Sedletski 9 years ago.
cfg.sh (2.0 KB) - added by Valery V. Sedletski 9 years ago.
a wrapper for `configure' (for setting its options)
configure.diff (18.8 KB) - added by Valery V. Sedletski 9 years ago.
Latest configure diff
env.sh (2.5 KB) - added by Valery V. Sedletski 9 years ago.
an environment setting script (generated by `configure')
Config.diff (2.0 KB) - added by Valery V. Sedletski 9 years ago.
The changes for Config.kmk

Download all attachments as: .zip

Change History (37)

comment:1 Changed 9 years ago by dmik

Description: modified (diff)

comment:2 Changed 9 years ago by Valery V. Sedletski

The build instructions:

1) Download the VBox sources from Netlabs svn:
[l:\src\vbox] svn co http://trac.netlabs.org/vbox/browser/trunk .

2) Install the requirement libs from Netlabs yum repository:
[l:\] yum install zlib-devel libpng-devel libxml2-devel libxslt-devel openssl-devel curl kbuild watcom-wlink-hll

3) Install OpenWatcom? in some dir, like f:\dev\watcom (I used OW version 1.9)

ftp://ftp.openwatcom.org/pub/open-watcom-c-os2-1.9.exe

4) Download and unpack GCC ver. 3.3.5-csd6 to any dir you like:

ftp://ftp.netlabs.org/pub/gcc/GCC-3.3.5-csd6.zip:

[d:\tmp] unzip GCC-3.3.5-csd6.zip -d f:\dev\gcc\v3.3.5-csd6

5) Download the libglib and libIDL from Hobbes:

http://hobbes.nmsu.edu/download/pub/os2/dev/util/glibidl_20070521.zip
unpack the gcc335 subdir to l:\src\box\src\libs\os2.x86\glibidl\gcc335

6) Set GCC environment (if you don't use a system-wide installed (from yum repo) compiler)
[l:\src\vbox] f:\dev\gcc\v3.3.5-csd6\usr\bin\gccenv.cmd

7) Edit the cfg.sh file to suit your paths (attached to this page). At least, you should set the GCCDIR, WATCOM paths, and some other optional ones: QTDIR, path to mkisofs, if it is not on PATH, GLIBIDL2 to path to unpacked libglib and libIDL libs.

8) ash

This will start ash.exe -- the UNIX-like shell

9) # ./cfg.sh

This should start `configure' script, which will generate the AutoConfig?,kmk -- the
build system config, and env.sh -- the script for setting the environment for the
build system.

10) # . ./env.sh

This will set the environment.

11) # kmk

This will start the build process

Last edited 9 years ago by Valery V. Sedletski (previous) (diff)

comment:3 Changed 9 years ago by diver

Milestone: VBox diverVBox driver

Milestone renamed

Changed 9 years ago by Valery V. Sedletski

Attachment: AutoConfig.kmk added

Changed 9 years ago by Valery V. Sedletski

Attachment: cfg.sh added

a wrapper for `configure' (for setting its options)

Changed 9 years ago by Valery V. Sedletski

Attachment: configure.diff added

Latest configure diff

Changed 9 years ago by Valery V. Sedletski

Attachment: env.sh added

an environment setting script (generated by `configure')

Changed 9 years ago by Valery V. Sedletski

Attachment: Config.diff added

The changes for Config.kmk

comment:4 Changed 9 years ago by rklipp

Hi Valerius, is there still problems with configure? I've applied both diff's (configure & config) and initiating configure with ash it gets past the OS2 vs oS2 problem and then fails with a Syntax error on line 927. The line (927) looks O.K. to me and works without error when compiled using the old way. Am I probably missing something?

comment:5 Changed 9 years ago by dmik

Type: taskdefect

Finally, I committed the configure patch in r7, though I simplified it a lot (many changes are not necessary in a proper RPM-based dev environment). This current version of the configure script requires the following dev setup:

  1. yum install which kbuild gcc gcc-wlink pthread-devel libxml2-devel libxslt-devel openssl-devel libcurl-devel zlib-devel libpng-devel libqt4-devel
  2. mkisofs.exe from http://hobbes.nmsu.edu/download/pub/os2/apps/mmedia/cd/cd-r/cdrecord-2_00_os2.zip in PATH
  3. OpenWatcom? 1.9 (from here I believe: ftp://ftp.openwatcom.org/pub/open-watcom-c-os2-1.9.exe)
  4. Glib and libIDL from http://hobbes.nmsu.edu/download/pub/os2/dev/util/glibidl_20070521.zip
  5. SDL from ftp://ftp.netlabs.org/pub/sdl/sdl-1.2.10-bin-20060602.zip
  6. ash from RPM as shell

and should be run as follows (under ash):

    export WATCOM=<path_to_OpenWatcom>
    export VBOX_PATH_GLIB=<path_to_glibidl>/gcc335
    export PATH_SDK_LIBSDL=<path_to_sdl>

    ./configure --disable-docs --with-ow-dir=$WATCOM

@rklipp, you may check if it works for you. But please keep in mind that you will get build failures very soon. We are still working to make it build to some stable point (the commits will follow soon).

Re Config.diff, I will check it too, I feel some corrections are not necessary there either after r7.

comment:6 Changed 9 years ago by Valery V. Sedletski

@rklipp: all problems now should go to dmik, he hacked my 'configure' version. And yes, it should be 'os2', not 'oS2' or 'OS2', because the OS names should be lowercase. And also, what do you mean by 'old way'? 927 is what version of 'configure'? Did you used cfg.sh?

comment:7 Changed 9 years ago by Valery V. Sedletski

@rklipp: As I looked into my version of 'configure', 927 is a C source for detecting 'libdevmapper', and this is used on Linux only, not used on OS/2.
In dmik's latest version, line 927 is the end of check_pthread() which did not changed at all. Could you add some more details, like version of 'configure', its parameters, do you use the last svn revision 'r7' from Netlabs repositrory?

Last edited 9 years ago by Valery V. Sedletski (previous) (diff)

comment:8 Changed 9 years ago by diver

with the installed r7 and the needed libs (like explained in comment:5) I was able to run configure to it's end. Only one file in SDL needed a change. SDL_config_os2.h the uintptr_t typedef needed to be commented out.

comment:9 Changed 9 years ago by rklipp

Hi valerius, The "Old Way" I referred to is, using configure as is in the source and building with manually set environment statements. This gets the build to the point where it craps out trying to work on the Trace Point Generator (probably something I missed in "Setting the environment". The way you are approaching the build (The New Way)is a far more intelligent method for accomplishing getting VBox to work with OS/2 -- Thanks for you're continued involvement.
dmik's r7 updated version of configure works fine here.

comment:10 in reply to:  9 Changed 9 years ago by Valery V. Sedletski

Replying to rklipp:
Then there's at least, three ways of building VBox: 1) as it was in the source -- is original 'configure' not touched bu us, and not working either 2) my version of 'configure' -- was attached here, it worked for me and 3) dmik's version, where he hacked my changes. Not sure what did you actually using, and what succeeded for you. My version had a wrapper, called 'cfg.sh', it helps to set the environment, as well as 'configure' parameters, so it is not clear, what parameters and env. variables were set here. And where is the Trace Point Generator in ash/configure :)

comment:11 Changed 9 years ago by rklipp

Yeah, I guess there are three ways but now #2 and #3 (for me)won't get past "cannot determine OS!, I guess I was mistaken when I earlier said r7 works fine. When I type ash, uname -s, I get OS/2. Then I type ./configure and get"cannot determine OS! -- also when I initially do ash I get sh, can't access tty - job control turned off, but ash seems to work O.K.

Is there any chance of getting a fairly detailed, updated set up procedure for either #2 or #3 with corrected configure, cfg.sh,?
One other place where I might be screwed up is I installed ash from yum as I'm not familiar with "ash from RPM".

I f I ever figure out how to get configure to work using you're method, I'll gladly try to find out where the Trace Point Generator is located, If you are interested, you can see my efforts compiling VBox using the un-edited configure file included with different VirtualBox? sources at http://www.os2-ecs-mexico.com in the VBox/2 Access Directory.

Last edited 9 years ago by rklipp (previous) (diff)

comment:12 Changed 9 years ago by rklipp

Hey valerius! When I stated r7 worked I was on a different machine that was running eCS 2.1 -- that machine developed monitor problems, so I started working on a different machine that was running eCS 2.2bII, and have been unable to make r7 or r3 work as I reported above. Now I'm back on the machine running eCS 2.1 with a fixed monitor and r7 does work once again. So it looks like r7 is O.K. and something is different between these two machines.

comment:13 Changed 9 years ago by Valery V. Sedletski

eCS 2.2bII installs the support of yum/rpm, from its CD, but it may be outdated, compared to Netlabs repository. So, you may try 'yum upgrade' to update your installed packages.

Regarding the error "Can't determine the OS!" -- yes, it runs 'uname -s', but then deletes the slash, via 'sed', and changes it to lowercase, using the 'tr' command. Then it is compared with BUILD_PLATFORM, being OS2, not os2. This is set by gccenv.cmd from Paul Smedley's GCC's. I used gcc3.3.5-csd6. It is used to build to build sources, for now. And my version of 'configure' (variant #2) (and all files in 'Attachments' section) is made to be aware of GCC being installed into different root than %UNIXROOT%/usr. It will be replaced with GCC4, installed into the common root, so this requirement will be not needed. But now, it is still needed. So, the solution for the "Cannot determine OS!" is to use gccenv.cmd, then 'cfg.sh'/'env.sh' generated which will set the environment correctly. This is described in my 1st message of this thread.

Regarding the "can't access tty - job control turned off" message -- it is a warning only. Yes, there is no job control API on OS/2. It is supported in UNIX only. So, you could just ignore it.

http://www.os2-ecs-mexico.com/

The new Mexican OS/2 site, interesting... I heard that "eCS in Mexico is dead!", or whatever, from Micho Durdevich. That was the good site with interesting articles, but it disappeared from the internet. Do you know, what's happened?

Last edited 9 years ago by Valery V. Sedletski (previous) (diff)

comment:14 Changed 9 years ago by Valery V. Sedletski

Hm, it looks that you have version 1.6.7 built... Downloaded it but did not yet tested. I saw the problem https://www.virtualbox.org/ticket/1939 by Paul Smedley, it exist in latest 5.0.x sources too. It is the problem with the Host Driver. Now I get it fixed, but the patches for the latest sources are not available, yet. They are in a queue now.

I've been at this for almost a year now and still do not have an acceptable compiled version with working sound, USB, shared folders and support for multiple processors.

Sound support is not implemented so far, Shared folders require an IFS. There is an IFS stub, it compiles, but it contains stubs only. Multiple processors are on the way, but not implemented too. All these require the OS/2-specific code to be written. The code for Windows/Linux/Mac? is available, but OS/2 code is not implemented, yet, as I can see. Not sure about USB, some code exist but need to test it, not sure about is it working or not.

comment:15 Changed 9 years ago by Valery V. Sedletski

The errors here: http://os2-ecs-mexico.com/indexStatus2159.html are because the GLIB and libIDL DLL's are not on the PATH, so xpidl.exe cannot find them, and shows a strange effect writing the contents of 'xpidl.exe' file to the stdout/stderr. So, you can add the out/os2.x86/release/bin directory to the BEGINLIBPATH, and it will be gone.

comment:16 Changed 9 years ago by Valery V. Sedletski

"...Linux older versions also work as guests. This limitation seems to be because Virtual PC cannot cope with the newer 2.6 kernels..."

I previously also thought so. But now I have Debian 8.1 32-bit installed in VPC (kernel version 3.16.0, i686 with PAE support), and it works in VPC. And this is because of a 32-bit version. Probably, the 64-bit Guest OS will not be working over 32-bit host OS. But 32-bit Guests work over 32-bit Host. But not sure -- maybe it is 3.x kernels work, but 2.6 won't. I had 32-bit Knoppix nearby, and it seems to be not working... It has the kernel version 2.6.32.6, and it hangs in VPC. So, maybe, it is kernel 2.6 bug, and it was fixed in 3.x kernels.

comment:17 in reply to:  14 Changed 9 years ago by Valery V. Sedletski

Replying to valerius:

Hm, it looks that you have version 1.6.7 built... Downloaded it but did not yet tested. I saw the problem https://www.virtualbox.org/ticket/1939 by Paul Smedley, it exist in latest 5.0.x sources too. It is the problem with the Host Driver.

Just checked your latest version 1.6.7, this problem ("Guru Meditation" error) is present too. (I tried to run Knoppix 6.2.1 from year 2010, it hanged, and I got this panic error in the VM log).

Now I get it fixed, but the patches for the latest sources are not available, yet. They are in a queue now.

The error solution is in ticket #21, though

comment:18 Changed 9 years ago by rklipp

Thanks for a lot of REALLY HELPFUL information -- now I need to get back to work,using the information you've provided!
I heard that "eCS in Mexico is dead!", That's "more or less true" --OS/2 is still holding on here and in Brazil, but nobody is about to invest in eCS when there is hope that an updated version is close to being completed. I don't know Micho Durdevich, but I do know there was a lot of really bad feelings about eCS mis-management at that time. That was a well run website.

comment:19 Changed 9 years ago by rklipp

Is there something strange about how configure recognizes Python? Python 2.7 is installed in usr/include, and I also put 2.7 source in usr/local/lib and configure still can't find it. I also had to install ILINK 5.0 to get this far, is that correct?

Last edited 9 years ago by rklipp (previous) (diff)

comment:20 Changed 9 years ago by Valery V. Sedletski

In /usr/local/lib/... ? Not sure if it looks there. Should work with older Pythons, down to Python 2.4, as i can see from makefiles. Ilink is not supported for a long time, as I heard. Now the use of wlink is preferred (it called like wlink-gcc or something, in rpm packages)

comment:21 in reply to:  19 Changed 9 years ago by diver

Replying to rklipp:

Is there something strange about how configure recognizes Python? Python 2.7 is installed in usr/include, and I also put 2.7 source in usr/local/lib and configure still can't find it. I also had to install ILINK 5.0 to get this far, is that correct?

I hope you use a pure rpm env. As we can only support this env. If you prefer to use a non rpm env, feel free to do so, but then you need to figure out such problems by your self. As we can't know how everyones build env looks like.

comment:22 Changed 9 years ago by dmik

@rklipp, if you take a clean eCS 2.2 beta II and follow instructions from comment:6, it will work. If it doesn't then you have messed up your environment (shells, paths, manual tool installations etc). You have to sort it out on your own as it's your machine and nobody knows what you did there :) ILINK 5.0 is not necessary and even should not be used at all. Python 2.7 works fine from the default locations where RPM/YUM installs it, no changes are needed there.

comment:23 Changed 9 years ago by rklipp

Good Advice! Thanks, Time to start over with a machine dedicated to this project only.

comment:24 Changed 8 years ago by rklipp

Hi valerius, SDL-1.2.10-bin-20060602 has been changed and no longer compiles with VBox versions prior to 1.5.x. SDL_config_os2.h (and probably other files)has been altered.I'm curious as to the reason for this, fortunatly I've still got the original files which do work, but others do not have them. Thanks for any info & apologies for bothering you.

comment:25 Changed 8 years ago by Valery V. Sedletski

2rklipp: That's dmik changed the layout of SDL package. Now it should be unpacked to the tools\os2.x86\libsdl\v1.2.10-20060602 root as it is from Hobbes. This is not my initiative, so I apologize :( The SDL headers were not changed, if I correctly remember. You only need to fix SDL_config_os2.h (comment the

typedef unsigned long       uintptr_t;

string out) and SDL_audio.h:

change the

void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);

line to

SDL_AudioCVTFilterCall filters[10];

and define the SDL_AudioCVTFilterCall type with

typedef void (SDLCALL *SDL_AudioCVTFilterCall)(struct SDL_AudioCVT *cvt, Uint16 format);

as described on official VBox OS/2 build page, so here is nothing new, I think.

comment:26 in reply to:  24 Changed 8 years ago by diver

Replying to rklipp:

Hi valerius, SDL-1.2.10-bin-20060602 has been changed and no longer compiles with VBox versions prior to 1.5.x. SDL_config_os2.h (and probably other files)has been altered.I'm curious as to the reason for this, fortunatly I've still got the original files which do work, but others do not have them. Thanks for any info & apologies for bothering you.

@klipp I hope you followed the http://trac.netlabs.org/vbox#Buildinstructions. In theory all whats needed is there. If something is missing, please let me know. As we didn't check in all patches from valerius we expect a lot build breaks until now. The checkins follow soon.

comment:27 Changed 8 years ago by rklipp

Hi diver, O.K., following the procedure at trac.netlabs -- three problems.
1: yum install can't/won't install zlib-devel & libqt4-devel --errors
2: yum install ash didn't install ash.exe in E:\usr\lib (possible I'm doing something wrong)-- I don't use RPM -- I manually installed ash.exe
3: ./configure --disable-docs --with -ow-dir=$WATCOM -- responds "Cannot determine OS!"

Hope this is helpful

Last edited 8 years ago by rklipp (previous) (diff)

comment:28 Changed 8 years ago by Valery V. Sedletski

2rklipp: Err, how could ash.exe and Qt4 install if you're don't using rpm? Yum without rpm? And, this is not supported, as we can't track any possible configuration, either.
Also, note that 'configure' searches for most libraries and tools in /usr/bin, /usr/include and /usr/lib, only. Some packages, like libSDL remained, which are searched in tools/os2.x86/..., but they will be integrated in rpm-based ports in the future, as it simplifies UNIX apps ports a lot. So, be aware of it, and better try fixing your ports tree, first. We may help.
At first, how did you install yum? Does it install something besides qt4? And please, give us the contents of your /etc/yum/repos.d/* (the repos list you've configured). What does /var/log/yum.log say?
"Cannot determine OS!" -- probably, you're missing uname.exe, and some other utilities needed for build. What does "uname -r" say? Did you looked into configure.log?
PS: What version of 'configure' are you using?

Last edited 8 years ago by Valery V. Sedletski (previous) (diff)

comment:29 Changed 8 years ago by rklipp

Hi valerius, I guess I didn't do a very good job of describing how I responded to divers post. I followed the install procedure as described in Netlabs (I thought that was what he was requesting)on a partition dedicated for the purpose of following you're development of VBox 1.5x, and installed eCS bII, which also installed yum & QT4, They both work fine. I thought he was looking for verification of the install procedure listed in Netlabs,and whether there were any problems with it, and I listed the problems that occurred while using it. I have the install procedure working correctly on another machine using r7 as has been described in earlier posts and it works fine.

DAMN!¡! I bet I had the old config version r3 NOT r7! --- now I feel like a REAL JERK!

comment:30 Changed 8 years ago by Valery V. Sedletski

Ah, my congratulations then :)

comment:31 in reply to:  27 Changed 8 years ago by diver

Replying to rklipp:

Hi diver, O.K., following the procedure at trac.netlabs -- three problems.
1: yum install can't/won't install zlib-devel & libqt4-devel --errors
2: yum install ash didn't install ash.exe in E:\usr\lib (possible I'm doing something wrong)-- I don't use RPM -- I manually installed ash.exe
3: ./configure --disable-docs --with -ow-dir=$WATCOM -- responds "Cannot determine OS!"

Hope this is helpful

there must be a real Problem with your Installation. We can't help you there and imho this doesn't belong to this ticket. Either fix your yum/rpm stuff by yourself, or try to describe whats wrong and open a ticket in the right section. We can't invest time in this problems here, as it has completely nothing to do with vbox. I hope you understand this.

comment:32 Changed 8 years ago by dmik

Resolution: fixed
Status: newclosed

This may be considered as done I suppose.

Note: See TracTickets for help on using tickets.