Author Topic: compiling glib-2.36.4 & libidl-0.8.14 -- need help  (Read 9963 times)

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
compiling glib-2.36.4 & libidl-0.8.14 -- need help
« on: September 17, 2014, 12:47:35 am »
I'm trying to compile glib and libidl using both gcc 332 & (or) gcc335 and I'm getting malformed input file error. This is obviously something I'm doing wrong. I have no problems compiling in gcc using kmk, but these sources (glib & libidl) apparently don't use kmk. Years ago I compiled using "ash" but looks like that is no longer an option. Could someone please straighten me out as to how to do this?

thanks  klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #1 on: September 17, 2014, 01:57:19 am »
Set MAKESHELL=ash to use ash with make, I personally prefer [pdk]sh which is available at Hobbes.
Can you post more info about the malformed file error, eg what command and output, basically the tail of your build log.
PS GCC 332 and its libc05 is ancient and buggy and GCC 335 is also old enough that much won't compile with it, especially C++ code though it should be fine for glib2 and libidl. Do you have the choice of using glib 1.21 and libidl 0.6.5? as they're available for compiling (older) Mozilla. I even have precompiled GCC 3.2.2 binaries as well as EMX and VACPP.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #2 on: September 17, 2014, 02:47:01 am »
Hey Dave, How are you doing? I was hoping I'd hear from you! Thanks for the reply. I think you're Set Makeshell=ash is probably what I need. The malformed file error is simply "malformed input file (not rel or archive) /usr/source/libidl-0.8.14.tar.bz2 (I get the same error using unzipped header libidl-0.8.14). I was using the older Glib & Libidl and then found out that the older version of libidl wouldn't work with GCC335 and had to be updated to libidl.0.8.14, but it carried with it the requirement that glib had to be updated to glib-2.36.4. and that's where I'm stuck now fighting my way through the $&$@#$% VBox source. I'll also try you're suggested [pdk]sh. I'll get back to work on this tomorrow.

Thanks again!  klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #3 on: September 17, 2014, 04:23:21 am »
Here's glib and libidl prebuilt for GCC 3.2.2 and 3.3.5, http://hobbes.nmsu.edu/download/pub/os2/dev/util/glibidl_20070521.zip.
If you're trying to build glib2 from source you're going to run into lots of problems. There's a port available here, http://trac.netlabs.org/ports, need to download the source with SVN and build it though.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #4 on: September 17, 2014, 06:43:09 am »
Yeah Dave, you're right, I'm in for lots of problems! I've been trying to make glibidl_20070521.zip work for two weeks now,  I can't make it work. I found the attached info on the Internet and now guess I'll have to get see if I can't get the newer Glib compiled. I've got glib-2.36.4.tar.gz downloaded but its not setup for kmk and I've forgotten how to compile is with ash. I'm hoping the port you mentioned that is on netlabs works out, I'll give it a try tomorrow  -- gotta get some sleep now, I'm making too many mistakes! Thanks again for the help, I'll post the results of the glib compile on netlabs.

klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #5 on: September 17, 2014, 07:03:29 am »
glibidl_20070521 should only need (environment variables pointing to where you installed it) %GLIB%\gcc\bin;%LIBIDL%\gcc\bin added to the PATH and BEGINLIBPATH.
To compile glib2 from scratch means having the right environment then running [a]sh configure && make
The hard part is having the right environment. Sometimes libtool needs patching as well, at least to produce a DLL.

R.M. Klippstein

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +3/-0
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #6 on: September 18, 2014, 03:02:12 am »
Hi Dave, Unbelievable! I still can't compile (build) using ash. I now have gcc335-(csd4) installed and working in /usr/bin. I also have a /usr/build directory containing the following sources: xpidl,2.2.4 (vbox source),glib-2.36.4, and glib-2.36.4.tar.gz. I did set makeshell=ash. using "ash" as a command doesn't work neither does "[a]sh". The only command sequence that attempts to compile is: gcc -v d:/usr/build/2.2.4. No matter which source I select in the build directory I get the same "malformed input file" error.
   Maybe the following screen capture will help you see where I'm screwed up!

The problem has to be right there in front of megcc version 3.3.5 (Bird Build 2011-10-03 04:55 (csd4))
 D:/usr/i386-pc-os2-emx/bin/ld.exe -o .exe D:/usr/lib/crt0.o -LD:/usr/lib/gcc-li
b/i386-pc-os2-emx/3.3.5 -LD:/usr/lib/gcc-lib -LD:/usr/lib/gcc-lib/i386-pc-os2-em
x/3.3.5 -LD:/usr/lib -LD:/usr/build/2.2.4 -LD:/USR/lib/gcc-lib/i386-pc-os2-emx/3
.3.5 -LD:/usr/i386-pc-os2-emx/lib -LD:/USR/i386-pc-os2-emx/lib -LD:/usr/lib -LD:
/usr/lib d:/usr/build/2.2.4/ -lc_alias -lc_dll -los2 -lgcc_so_d -lc_alias -lc_dl
l -los2 -lgcc_so_d -lc_alias -lc_dll -los2 -lgcc_so_d -lc_alias -lc_dll -los2 -l
gcc_so_d -lc_alias -lc_dll -los2
D:/usr/i386-pc-os2-emx/bin/ld.exe: malformed input file (not rel or archive) d:/
usr/build/2.2.4/

Apologies for my continued bugging you.   klipp

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: compiling glib-2.36.4 & libidl-0.8.14 -- need help
« Reply #7 on: September 18, 2014, 03:57:46 am »
What is generating that insane command? Most of it is automatically found by GCC (and I assume LD) and could be simplified as
Code: [Select]
LD -o .exe -LD:/usr/build/2.2.4
or better
GCC -o .exe -LD:/usr/build/2.2.4
I'm not used to using LD directly but assume -o and -L works the same as GCC. Your executable is missing a prefix and all you're doing is pulling in the stuff that is automatically pulled in and searching for libs in d;/usr/build/2.2.4 which is probably the parent or grandparent of where ever the libs are.
Basdically LD is getting confused by not being fed any objects besides the libc ones that are automatically pulled in.