Confirmed. The guilty is length of command line
Harbour build entirely except harbourm.dll in OMF type with gcc335 and
gcc4xx
I tried to build with Harbour 12604 and after two days of tests I tried
with Harbour 12621 (a fresh new one) with identical results
Harbour build report:
-------------------
gcc: gcc: error executing emxomfld.exe: Invalid argument
make[4]: *** [harbourm.dll] Error 1
make[3]: *** [descend] Error 2
make[2]: *** [mt] Error 2
make[1]: *** [dynlib] Error 2
make: *** [source] Error 2
-------------------
and part of make_gnu.log show (in 12621):
-------------------
gcc -Zomf -shared -L../../../../../lib/os2/gcc -o
../../../../../bin/os2/gcc/harbour.dll @__dyn__.tmp __dyn__.def -lsocket
Warning! W1058: file ldvJjRLI.: line(613): protmode option not valid for
an OS/2 EMX dynamic link library
emximp -o ../../../../../lib/os2/gcc/harbour.lib
../../../../../bin/os2/gcc/harbour.dll
make[3]: Leaving directory
`E:/harbour909f/harbour/source/dynlib/obj/os2/gcc'
make[3]: Entering directory `E:/harbour909f/harbour/source/dynlib/mt'
make[4]: Entering directory
`E:/harbour909f/harbour/source/dynlib/mt/obj/os2/gcc'
gcc -Zomf -shared -L../../../../../../lib/os2/gcc -o
../../../../../../bin/os2/gcc/harbourm.dll @__dyn__.tmp __dyn__.def
-lsocket
make[4]: Leaving directory
`E:/harbour909f/harbour/source/dynlib/mt/obj/os2/gcc'
make[3]: Leaving directory `E:/harbour909f/harbour/source/dynlib/mt'
make[2]: Leaving directory `E:/harbour909f/harbour/source/dynlib'
make[1]: Leaving directory `E:/harbour909f/harbour/source'
make: Leaving directory `E:/harbour909f/harbour'
-------------------
So harbour.dll was building fine and not harbourm.dll (!?)
Note warning for protmode in harbour.dll
Checking and comparing __dyn__.tmp are near identical except for vmmt
directory. Contains same number and names of objects and so on ...
I started a long way of changing values in *.mk files without success,
allways with same error
"gcc: gcc: error executing emxomfld.exe: Invalid argument"
Reading info I used "p" parameter for make.exe which describe a long
list of values/operations used in current make proccess. It show a lot
of redefinitions
The intention was to limit list of libraries included in order to find
the "possible" object file causing error
I never found where to change this library list, and specially for mt
Never found LIBS definition for this expression:
DLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),-l$(lib))
and suppressing it nothing change
Note: using $(DYNNAME) does not include .dll extension, so I suppose it
is added by default and not due Harbour definitions
@$(ECHO) LIBRARY $(DYNNAME) INITINSTANCE TERMINSTANCE >> __dyn__.def
Question: why source\dynlib\Makefile include line
include $(TOP)$(ROOT)config/dir.mk
and not are included in source\dynlib\mt\Makefile ?
Then I used the "brilliant" idea of use -v parameter in gcc and it gave
a lot of explanations
I tried to include sections for harbour.dll and harbourm.dll but editor
said: "too much selected text for clipboard buffer"
So it is a lot of text :-)
Spliting section for harbour.dll have this form:
---------------------------
gcc -Zomf -shared -L../../../../../lib/os2/gcc -v -o
../../../../../bin/os2/gcc/harbour.dll @__dyn__.tmp __dyn__.def -lsocket
Reading specs from E:/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5/specs
Configured with: D:/CODING/LIBC/SVN/BRANCHES/LIBC-0.6/src/gcc/configure
--enable-clh --enable-threads=os2 --enable-shared=libgcc,bfd,opcodes
--enable-nls --without-included-gettext
--with-local-prefix=D:/CODING/LIBC/SVN/BRANCHES/LIBC-0.6/TOOLS/x86.os2/gcc/staged
--prefix=/gcc --with-gnu-as --disable-libgcj --enable-languages=c,c++
Thread model: os2
gcc version 3.3.5 (Bird Build 2007-06-10 14:30)
emxomfld.exe -Zdll
-o ../../../../../bin/os2/gcc/harbour.dll
E:/usr/lib/dll0.obj
-L../../../../../lib/os2/gcc
-LE:/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5
-LE:/usr/lib/gcc-lib
-LE:/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5
-LE:/usr/lib
-LE:/harbour909f/harbour/source/dynlib/obj/os2/gcc
-LE:/USR/lib/gcc-lib/i386-pc-os2-emx/3.3.5
-LE:/usr/i386-pc-os2-emx/lib
-LE:/USR/i386-pc-os2-emx/lib
-LE:/usr/lib
-LE:/usr/lib
..\..\..\..\..\source\common\obj\os2\gcc\expropt1.obj
[rest of .obj files list]
..\..\..\..\..\source\vm\obj\os2\gcc\vm.obj
__dyn__.def -lsocket
-lc_alias
-lc_dll
-los2
-lgcc_so_d
-lc_alias
-lc_dll
-los2
-lend
Warning! W1058: file ldiCT5F5.: line(613): protmode option not valid for
an OS/2 EMX dynamic link library
emximp -o ../../../../../lib/os2/gcc/harbour.lib
../../../../../bin/os2/gcc/harbour.dll
---------------------------
Spliting section for harbourm.dll have exactly the same form. The only
differences are:
- "..\..\..\..\..\..\" in place of "..\..\..\..\..\"
- "vm\vmmt\" in place of "vm\"
I tried to build harbourm.dll using a directory in same level of dynlib,
for example "source\mydyn", suppresing "source\dynlib\mt", using
Makefile for "source\dynlib\mt" moving up one dir, and adjusting
Makefile for "source"
Results was an harbourm.dll with exactly the same length as harbour.dll
:-) (?)
So I changed test:
- Move source\dynlib\mt\obj\os2\gcc\__dyn__.tmp, .def files one dir up,
to source\dynlib\mt\obj\os2\__dyn__.tmp, .def files
- Change in __dyn__.tmp "..\..\..\..\..\..\" with "..\..\..\..\..\"
- Execute gcc for harbourm.dll using a dir up:
gcc -Zomf -shared -L../../../../../lib/os2/gcc -o
../../../../../bin/os2/gcc/harbourm.dll @__dyn__.tmp __dyn__.def -lsocket
and harbourm.dll build fine, with different size than harbour.dll
Same warning for protmode in harbourm.dll
So the reason for emxomfld failure is due to length of long list of
object files in section:
--------------------------
..\..\..\..\..\..\source\common\obj\os2\gcc\expropt1.obj
[rest of .obj files list]
..\..\..\..\..\..\source\vm\vmmt\obj\os2\gcc\vm.obj
--------------------------
This harbourm.dll list is longer than harbour.dll list by a value of:
"..\" length multiplied by number of total object files plus
"vmmt\" length multiplied by number of vmmt object files
3*593 + 5*21 = 1779 + 105 = 1884 byes
so seem to arrive truncated to emxomfld.exe and cause "invalid argument"
error
Moving up one dir resolve need of at least 1779 bytes plus others for -L
and -o switchs
Viktor, Maurilio, Przemek:
any idea to overcome this limit ?
Below are help for emxomfld.exe
Perhaps you can identify quickly some switch to use
Note: emxomfld.exe is the same for gcc335 and gcc4xx. It is contained in
gcc335 and not in gcc4xx
In fact, gcc335 is a pre-requisite for gcc4xx due last use some tools of
former
David Macias
emxomfld 0.6.3 (Bird Build 2007-06-11 22:22)
Copyright (c) 1992-1996 by Eberhard Mattes
Copyright (c) 2003 by InnoTek Systemberatung GmbH
Copyright (c) 2003-2006 by Knut St. Osmundsen
Usage: emxomfld -o <file> [-l <lib>] [-L <libdir>] [-T <base>] [-igtsS]
[-Zexe] [-Zdll] [-Zsym] [-Zstack <size>] [-Zmap[=<map_file>]]
[-Z[no-]autoconv] [-Zdll-search] [-O <option>] [-static]
[-non_shared] [-Bstatic] [-dn] [call_shared] [-Bshared]
[-dy] <file>...
Options:
-Zno-autoconv / -Zautoconv:
Turns off/on the automatic conversion of a.out libs and objs.
default: -Zautoconv
-Bstatic, -non_shared, -dn, -static:
Link with static libraries.
The search order is then changed to: lib<name>_s.lib, <name>_s.lib,
lib<name>.lib, <name>.lib
-Bshared, -call_shared, -dy:
Link with shared libraries. This is default.
The search order is then changed to: lib<name>_dll.lib, <name>_dll.lib,
lib<name>.lib, <name>.lib, <name>.dll, lib<name>_s.lib, <name>_s.lib.
-Zdll-search:
Enables dlls as valid libraries from shared linking. (default disabled)
-Zsym: Invoke mapsym.cmd on the mapfile to produce a .sym file.
Requires -Zmap.
Environment variables:
EMXOMFLD_TYPE:
The type of linker we're using. Values: WLINK, VAC365, VAC308, LINK386.
WLINK wlink.exe from Open Watcom v1.5 or later.
VAC365 ilink.exe from IBM C and C++ Compilers for OS/2 v3.6
or later.
VAC308 ilink.exe from Visual Age for C++ v3.08.
LINK386 link386 form OS/2 install or DDK.
EMXOMFLD_LINKER:
Name of the linker to use and optionally extra parameters. Spaces
in the
linker name or path is not supported. Quotes are not supported either.
The default values for these two variables are VAC365 and ilink.exe.
EMXOMFLD_RC_TYPE:
The type of resource compiler we're using. Values: RC,WRC.
RC rc.exe as shipped with OS/2 or found in the Toolkit
WRC wrc.exe from Open Watcom v1.6 or later.
EMXOMFLD_RC:
Name of the resource compiler to use and optionally extra parameters.
Spaces or quotes in the name or path are not supported.
The default values for these two variables are RC and rc.exe.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour