OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: R.M. Klippstein on June 23, 2014, 05:38:28 am

Title: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on June 23, 2014, 05:38:28 am
When compiling XPCOM it "craps out" when it gets to compiling XPIDL. Its looking for xpidl.o and there is no such file in the source or any other place I've searched. Anybody know where I can find xpidl.o? It looks like XPIDL could be replaced with PYXPIDL but I have no idea how a person would initiate this change in XPCOM. Thanks in advance for any ideas on how to solve this.

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: Dave Yeo on June 23, 2014, 06:03:45 am
More information please. What exactly are you compiling and perhaps post the tail of your build.log with the exact error
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on June 24, 2014, 06:04:12 pm
Hi Dave, Thanks for responding, here is a little more info:
I'm trying to build a newer version of VirtualBox for OS/2-eCS. I've started with 3 older versions (1.6.0,1.6.6, and 2.2.4) hoping to get one to compile, and then move gradually up to newer versions. I started  out doing this (gcc) in eCS but have now moved to Linux (much faster, and more friendly). I've had my best success compiling with 2.2.4 but all versions have the same problems getting through the XPCOM compile. My latest efforts are first trying to compile a pure Linux build (no OS/2 target) just to get a feel of how a successful build would look!  -- it gives the same XPCOM  error! I'm a FAR CRY from an expierenced gcc user, but this looks to me like something missing in the source code. I'm compiling using kmk. Thanks again for any ideas.

klipp
******************************************************************************************************************
kBuild: Installing /home/klipp/1.6.6/out/linux.x86/release/stage/bin/sdk/include/xpcom/ipcd/ipcdclient.h
kBuild: Compiling xpidl - xpcom/typelib/xpidl/xpidl.c
In file included from /home/klipp/1.6.6/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.c:42:0:
/home/klipp/1.6.6/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h:58:24: fatal error: xpt_struct.h: No such file or directory
 #include <xpt_struct.h>
                        ^
compilation terminated.
kmk[3]: *** [/home/klipp/1.6.6/out/linux.x86/release/obj/src/libs/xpcom18a4/xpidl/xpcom/typelib/xpidl/xpidl.o] Error 1
The failing command:
@gcc -c -O2 -pipe -ansi -Wall -Wno-unused -I/usr/include/libIDL-2.0 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -O -pthread -m32 -I/home/klipp/1.6.6/out/linux.x86/release/bin/sdk/include -I/home/klipp/1.6.6/out/linux.x86/release/bin/sdk/include/xpcom -I/home/klipp/1.6.6/out/linux.x86/release/bin/sdk/include/xpcom/nsprpub -I/home/klipp/1.6.6/out/linux.x86/release/bin/sdk/include/xpcom/string -I/home/klipp/1.6.6/out/linux.x86/release/bin/sdk/include/xpcom/xpcom -I/home/klipp/1.6.6/out/linux.x86/release/bin/sdk/include/xpcom/ipcd -I/home/klipp/1.6.6/include -I/home/klipp/1.6.6/out/linux.x86/release -DVBOX -DVBOX_OSE -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_X86 -D__X86__ -DMOZILLA_CLIENT=1 -DNDEBUG=1 -D_IMPL_NS_COM -DXPCOM_DLL_BASE=\"VBoxXPCOM\" -DMOZ_DLL_SUFFIX=\".so\" -DMOZ_PRESERVE_PIC -DEXPORT_XPT_API -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DXP_UNIX=1 -D_GNU_SOURCE -DHAVE_VISIBILITY_ATTRIBUTE=1 -Di386=1 -Wp,-MD,/home/klipp/1.6.6/out/linux.x86/release/obj/src/libs/xpcom18a4/xpidl/xpcom/typelib/xpidl/xpidl.o.dep -Wp,-MT,/home/klipp/1.6.6/out/linux.x86/release/obj/src/libs/xpcom18a4/xpidl/xpcom/typelib/xpidl/xpidl.o -Wp,-MP -o /home/klipp/1.6.6/out/linux.x86/release/obj/src/libs/xpcom18a4/xpidl/xpcom/typelib/xpidl/xpidl.o /home/klipp/1.6.6/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.c
kmk[3]: Leaving directory `/home/klipp/1.6.6/src/libs/xpcom18a4'
kmk[2]: *** [pass_bldprogs_before] Error 2
kmk[2]: Leaving directory `/home/klipp/1.6.6/src/libs'
kmk[1]: *** [pass_bldprogs_before] Error 2
kmk[1]: Leaving directory `/home/klipp/1.6.6/src'
kmk: *** [pass_bldprogs_before] Error 2
klipp@Asus:~/1.6.6$
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: Dave Yeo on June 25, 2014, 04:09:54 am
Never built virtualbox and that's an old version of xpcom. I'd guess that for some reason the build isn't copying or symlinking xpcom/typelib/xpt/public/xpt_struct.h to /home/klipp/1.6.6/out/linux.x86/release/bin/sdk//include/xpcom. You could try manually copying or symlinking it as a temporary workaround, might need to do the same with xpt_xdr.h as well.
You're going to have to look earlier in your build log for where  /home/klipp/1.6.6/out/linux.x86/release/bin/sdk//include/xpcom gets populated and see if anything jumps out at you in the way of warnings, errors etc. kmk 2>&1 | tee build.log should create a build.log for leisurely examination. It is actually a build system error rather then a GCC error which only looks for include files where you tell it to.
Hopefully you don't have similar issues with the idl files, they're compiled into h files with help from libidl which you will need. Newer xpcom uses Python and the xpcom\typelib\xpidl only has a makefile.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: ivan on June 26, 2014, 02:42:52 pm
Klipp, you are not the only one having this type of problem, in fact http://www.theregister.co.uk/2014/06/26/boffins_untangle_why_your_software_builds_fail/ it is a well known problem that world+dog are looking at.

I also have to say that I hope you are successful in your endeavour. 
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on June 27, 2014, 04:57:09 pm
Thanks for the response ivan -- I may have found a solution for the "XPCOM Landmine!"  but it  comes at a cost!  -- One step forward, 2 steps backward!

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 02, 2014, 05:57:23 am
Hey Dave, I've gotten by the XPCOM nightmare but now I'm hung up on something that should be so darned simple, but is blowing me away.  I'm now fighting: kmk: *** No rule to make target `/home/klipp/3.0.2/src/libs/curl-7.19.4/Makefile.kmk'.  Stop
There is no curl-7.19.4 in the source and downloading curl 7.19.4 doesn't work as it lacks a Makefile.kmk. any ideas on how to resolve this?

Thanks, klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 02, 2014, 08:10:33 pm
Dumb Question!ยก!  Please ignore my previous post!

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 20, 2014, 09:36:48 pm
I've  XPCOM taken care of as well as a few other items but now I'm "stuck" again. Now the newer VBox sources need Python and I can't seem to get it (Python 2.7) installed in OS/2. This is pretty obviously something I'm doing wrong! Could someone who has it installed and working please explain in reasonable detail how it should be installed.

Thanks again in advance for any help rendered.  klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 21, 2014, 12:07:02 am
I've  XPCOM taken care of as well as a few other items but now I'm "stuck" again. Now the newer VBox sources need Python and I can't seem to get it (Python 2.7) installed in OS/2. This is pretty obviously something I'm doing wrong! Could someone who has it installed and working please explain in reasonable detail how it should be installed.

Thanks again in advance for any help rendered.  klipp

It seems you're not using RPM/YUM (http://trac.netlabs.org/rpm/).

Install it, python will be installed and configured automatically.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 21, 2014, 01:09:18 am
Hi Boris, I've also tried YUM INSTALL PYTHON, but it throws an error saying python 26 is required! Guess its a pre-req.

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 21, 2014, 01:28:53 am
Hi Boris, I've also tried YUM INSTALL PYTHON, but it throws an error saying python 26 is required! Guess its a pre-req.

klipp
What does python --version command output?

It seems that your rpm/yum installation is screwed. Try installing an arbitrary packet or doing a yum list, for example. Does that work?
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 21, 2014, 01:55:19 am
Boris, YUM works fine, YUM LIST lists the entire repository. I also installed  gcc & QT4 without problems using YUM.   python --version gives python 2.6.5

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 21, 2014, 02:13:36 am
Boris, YUM works fine, YUM LIST lists the entire repository. I also installed  gcc & QT4 without problems using YUM.   python --version gives python 2.6.5

klipp

yum update?
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 21, 2014, 03:09:25 am
I did yum update, it updated several headers, but then did the following:

[D:\] yum install python
Setting up install process
error: rpmdbNextIterator: skipping h#   134  region trailer:BAD,tag -1 type-1 offset 1 count -1
Package python-2.7.6-10.oc00.i386 already installed and latest version
Nothing to do

[D:\]python --version
Python 2.6.5

I'm outta here until tomorrow, (P.O'ed wife!) thanks for the help

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 21, 2014, 03:34:03 am
I did yum update, it updated several headers, but then did the following:

[D:\] yum install python
Setting up install process
error: rpmdbNextIterator: skipping h#   134  region trailer:BAD,tag -1 type-1 offset 1 count -1
Package python-2.7.6-10.oc00.i386 already installed and latest version
Nothing to do

[D:\]python --version
Python 2.6.5

I'm outta here until tomorrow, (P.O'ed wife!) thanks for the help

klipp

Please search for python.exe, you most probably got the interpreter installed somewhere else, like, for example, yum bootstrap console, if you haven't erased it, and it's still in your PATH.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 21, 2014, 10:58:47 pm
Hi Boris, Now I have python.exe located in D:\tmp\yumbt\usr\ ! I tried running it from that location and it said it needed gcc473.dll. I copied gcc473 from /local473 directory to /ecs/dll and it runs giving this:

Python 2.6.5 (r265:79063, the date and the time!
gcc4.4.4 on os2knix
type "help", "copyright" etc etc for more information

Typing help did nothing and hung the system  --- I rebooted and copied \tmp\yumbt\usr to D:\usr. that looks like it fixed everything, I can use the python help menues etc.
But typing python --version at the root command prompt gives:Python 2.6.5 (not Python 2.7.6)? Which leaves me to wonder what I should use as an "iNCLUDE"  header when trying to compile source that is looking for the python header.
Also returning to yum and trying to install any of the debug, devel, magic, test, or tools packages gives the error:rpmdb:Damaged header #134 retreive----skipping. The system loops on this error and re-boot is only way out.
Thanks again for you're patience and excellent help!

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 22, 2014, 08:45:46 am
Hi Boris, Now I have python.exe located in D:\tmp\yumbt\usr\ !

That's where all you problems come from.

I rebooted and copied \tmp\yumbt\usr to D:\usr. that looks like it fixed everything

That was a mistake, you should've just erased the whole \tmp\yumbt directory, then you'd have the only Python of version that yum reports.

You shouldn't have copied the bootstrap directory structure to your unixroot, now I have no idea what is the right way to return the environment to a geniune state.

Maybe yum reinstall python will replace your old python from yumbt with the new one from the repo, and maybe it will go without an apparent problem.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 23, 2014, 12:53:46 am
Thanks Boris, I screwed it up good and have been unable to get it straightened out correctly. I had backed up the \usr directory before doing any copying from \tmp\yumbt directory so I'm back to using python 2.6, it seems to work O.K. with my vbox compiling. I installed 2.7 correctly on a different partition and it works fine.  I'm thinking of copying the working  python 2.7 \usr directory to the partition I'm doing my compiling on , I believe that might make it work.

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 23, 2014, 10:28:27 am
Thanks Boris, I screwed it up good and have been unable to get it straightened out correctly. I had backed up the \usr directory before doing any copying from \tmp\yumbt directory so I'm back to using python 2.6, it seems to work O.K. with my vbox compiling. I installed 2.7 correctly on a different partition and it works fine.  I'm thinking of copying the working  python 2.7 \usr directory to the partition I'm doing my compiling on , I believe that might make it work.

klipp

If yum reports you have python 2.7 installed, I can't see how it may be not installed, if you haven't modified the files in unixroot by hand.

Again, when you do python --version, the executable file in \tmp\yumbt is most likely gets executed instead of the one in \usr\bin!

And again, you don't need \tmp\yumbt now at all, it is located in the temporary directory \tmp, which means it is for one-time use and it should be deleted after your initial set up of rpm/yum env (yum install yum).

Everything you need is to delete \tmp\yumbt, search for all python.exe executable files, delete all of them that are in PATH but are not in \usr\bin, and you're done.

The python.exe executable that is in \usr\bin are most probably the right one, of version 2.7. After you delete all the garbage python interpreters you have on the file system accidentally, just re-check you're left with 2.7 by python --version. It just should be okay.

If it's still isn't for some reason, like you've modified the files in \usr, then a simple yum update && yum reinstall python will work.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 23, 2014, 11:25:41 pm
Hi Boris, this is turning into an unending mess!I think the basic problem is this: As soon as \tmp\yumbt  is deleted yum is GONE, Gives The system cannot find the path specified! Also there is no config.sys.yum created.The only way to run yum is to re-install the wpi. Re-installing, like you recommended, and then running "yum update && yum reinstall python" looks great untill I ran python --version which said: The system cannot find the file python27 (no python27 dll? in \usr).  I downloaded a python27.dll file off the Internet but it wouldn't load in a os2 enviorment. With a workable python27.dll it might work.
Looks like yum install is not creating the necessary run files so that the yumbt directory can be deleted. I verified this by trying it in both partitions. Yum seems to work fine (except for installing python)  as long as \tmp\yumbt isn't removed.

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: ivan on August 24, 2014, 01:14:50 am
Hi Klipp,

We run Python2.7.2 here and all we did was to download the zip from Paul's site and unzip it to the programming directory (we use it to produce scripts for control and management of clients servers).

Maybe you could do the same and then move the unzipped directories to where you need them.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 24, 2014, 01:53:06 am
Hi Boris, this is turning into an unending mess!I think the basic problem is this: As soon as \tmp\yumbt  is deleted yum is GONE, Gives The system cannot find the path specified! Also there is no config.sys.yum created.The only way to run yum is to re-install the wpi. Re-installing, like you recommended, and then running "yum update && yum reinstall python" looks great untill I ran python --version which said: The system cannot find the file python27 (no python27 dll? in \usr).  I downloaded a python27.dll file off the Internet but it wouldn't load in a os2 enviorment. With a workable python27.dll it might work.
Looks like yum install is not creating the necessary run files so that the yumbt directory can be deleted. I verified this by trying it in both partitions. Yum seems to work fine (except for installing python)  as long as \tmp\yumbt isn't removed.

klipp

As I said in the beginning, your rpm/yum installation is completely screwed, and you do random things, which doesn't help it.

It's good you've reinstalled it from scratch, it's gonna be clearer now a lot.

I can't see what's wrong again. It should work perfectly. Is %UNIXROOT% appropriate? Have you rebooted? Several times? After you did yum install yum? Is \usr\lib in your LIBPATH in CONFIG.SYS? Rebooted? Do you have the \tmp\yumbt directory? Is there a python27.dll file in \usr\lib?

If for some very odd and stupid reason there is no python27.dll file in \usr\lib, which is provided by the python-libs-2.7.6-10.oc00.i386 (http://rpm.netlabs.org/release/00/i386/i386/python-libs-2.7.6-10.oc00.i386.rpm) package (installed automatically as a dependency of python-2.7.6-10.oc00.i386 (http://rpm.netlabs.org/release/00/i386/i386/python-2.7.6-10.oc00.i386.rpm) during yum update), you can still download it from my OS/2 DLLs search service (http://dbanet.org/libs) (direct link (http://dbanet.org/libs/files/python27.dll)), or download the package by yourself and extract its contents by rpm2cpio package.rpm | cpio -idmv and then place it into \usr\lib.

!!! PLEASE TRIPLE-RE-CHECK YOU HAVE ONLY ONE PYTHON.EXE EXEMPLAR !!!

P. S. It seems for me that some significant part of OS/2 users are under-qualified to use rpm/yum correctly.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 24, 2014, 01:55:43 am
Hi Klipp,

We run Python2.7.2 here and all we did was to download the zip from Paul's site and unzip it to the programming directory (we use it to produce scripts for control and management of clients servers).

Maybe you could do the same and then move the unzipped directories to where you need them.

Don't use Paul's software in conjunction with netlabs rpm/yum env's if you don't perfectly know what are you doing, it's generally not quite compatible (just because Paul doesn't care to be compatible with it, it doesn't mean his software is bad).

Python is quite a core component of the env, if you break it, you will need to recover by hand, as yum is broken too. That's not a problem if you know what're you doing.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: R.M. Klippstein on August 24, 2014, 04:00:03 am
This "Under qualified to use rpm/yum" os2 user corrected the problem by installing a working python27.dll in \usr\lib

klipp
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: ivan on August 24, 2014, 10:55:35 am
Sorry Boris, but there are a lot of us that DO NOT have RPM/YUM on our computers for various reasons, one of them being commercial usage and another being that we don't like the arbitrary way it dumps things on the hard disk, so installing Paul's software is not a problem.
Title: Re: Compiling XPCOM (xpidl) fails -- need help!
Post by: dbanet on August 24, 2014, 11:28:28 am
Sorry Boris, but there are a lot of us that DO NOT have RPM/YUM on our computers for various reasons, one of them being commercial usage and another being that we don't like the arbitrary way it dumps things on the hard disk, so installing Paul's software is not a problem.

I'm not talking about the case when you don't use rpm/yum, please re-read my comment.