Issue 24588 - MinGW port efforts and information
Summary: MinGW port efforts and information
Status: CLOSED WONT_FIX
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.1.1a
Hardware: PC Windows XP
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: vg
QA Contact: issues@tools
URL:
Keywords:
: 13889 (view as issue list)
Depends on: 27582 27702 29141 29402 29494 29615
Blocks:
  Show dependency tree
 
Reported: 2004-01-20 01:28 UTC by khirano
Modified: 2013-08-07 15:35 UTC (History)
13 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
tono's patch 1 (131.04 KB, patch)
2004-01-20 01:40 UTC, khirano
no flags Details | Diff
tono's patch 2 (33.18 KB, patch)
2004-01-20 01:41 UTC, khirano
no flags Details | Diff
tono's patch 3 (343.58 KB, patch)
2004-01-20 01:42 UTC, khirano
no flags Details | Diff
Patches for MINGW headers (7.77 KB, patch)
2004-04-03 02:07 UTC, tono
no flags Details | Diff
Patches for solenv (137.39 KB, patch)
2004-04-03 02:08 UTC, tono
no flags Details | Diff
Patches for project makefiles (83.81 KB, patch)
2004-04-03 02:09 UTC, tono
no flags Details | Diff
Patches for project source files, delivery lists, map files etc. (394.79 KB, patch)
2004-04-03 02:11 UTC, tono
no flags Details | Diff
Additional patch (2.99 KB, patch)
2004-04-03 02:12 UTC, tono
no flags Details | Diff
Patches for MINGW headers (updated) (7.60 KB, patch)
2004-04-05 22:34 UTC, tono
no flags Details | Diff
Patches for MINGW headers (updated April 10,2004) (7.23 KB, patch)
2004-04-10 14:32 UTC, tono
no flags Details | Diff
Patches for project makefiles (updated April 10,2004) (83.19 KB, patch)
2004-04-10 14:33 UTC, tono
no flags Details | Diff
Patches for solenv (updated April 10,2004) (137.34 KB, patch)
2004-04-10 14:35 UTC, tono
no flags Details | Diff
Patches for project source files, delivery lists, map files etc. (435.58 KB, patch)
2004-04-10 14:36 UTC, tono
no flags Details | Diff
Patch for windres.exe (527 bytes, patch)
2004-04-12 14:31 UTC, tono
no flags Details | Diff
ls -la solver/645/wntgcci.pro/bin (44.02 KB, text/plain)
2004-04-16 04:44 UTC, quetschke
no flags Details
ls -la solver/645/wntgcci.pro/lib (27.33 KB, text/txt)
2004-04-16 04:45 UTC, quetschke
no flags Details
Patch for sal (527 bytes, patch)
2004-04-18 07:02 UTC, quetschke
no flags Details | Diff
Patch for odk (2.95 KB, patch)
2004-04-18 07:02 UTC, quetschke
no flags Details | Diff
Patch for javaunohelper (681 bytes, patch)
2004-04-18 07:03 UTC, quetschke
no flags Details | Diff
Patches for MINGW headers (updated September 12,2004) (9.91 KB, patch)
2004-09-12 08:58 UTC, tono
no flags Details | Diff
Patches for solenv (updated September 12,2004) (138.79 KB, patch)
2004-09-12 09:01 UTC, tono
no flags Details | Diff
Patches for project source files, delivery lists, map files etc. (Updated Spetember 12, 2004 (439.44 KB, patch)
2004-09-12 09:02 UTC, tono
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description khirano 2004-01-20 01:28:50 UTC
About MinGW+4nt build efforts, please read the thread starting from:
http://porting.openoffice.org/servlets/ReadMsg?list=dev&msgNo=10767

Besides the above effort, we are trying to build ooo with MinGW+tcsh environment.

Our goal is to build ooo for Windows with all free tools.

darragh and khirano talked in #OpenOffice.org irc chat about exchanging
information for mingw porting.

ja.oo.o created a mingw port team which consists of three developers:
tono(takashi ono): expert to read code, make patches and mainly build ooo for
Windows. he is the first to work on mingw port in japanese ooo community.
curvirgo(masutomi yoshiyuki): can read code, can make patches and build both ooo
for Windows and Linux.
khirano(kazunari hirano): code ignorant but build ooo for Linux.
Comment 1 khirano 2004-01-20 01:38:24 UTC
Let me summarize what tono(takashi ono) has done:

Working on 1.1rc4 with mingw+tcsh he has built several modules up to xmlhelp. 
He may want to tell us here exactly what modules he has built and the system and
tools which he used.

Let me show you what he has found so far.

1) berkeleydb, one of the external projects, can't be used properly by clients.

2) MinGW's bintool has got a bug with --enable-runtime-pseudo-reloc. To
workaround this, bintool has to be patched and rebuilt.

3) WINAPI included in MinGW is not enough to build ooo.  It is necessary to port
some headers of Platform SDK and to create import libraries.  And also interface
IID entities need to be implemented to some WINAPI.

4) Many of Ole interface related modules handle COM object pointers with
comdef.h and ATL templates.  These templates must be ported.

5) They say that Windows import libraries can be used with MinGW's ld but this
is slightly difficult to do, which means it sometimes doesn't work.  We'd better
have a strategy to create import libraries with ar type archive.

6) dmake built with MinGW still doesn't work.  He uses dmake which was build for
MSVC+tcsh.  If MinGW built dmake works, we would have to change the strategy to
change makefiles.

7) If you define absolute pathes with /cygdrive/x/... format in parameters which
are provided to tools, MinGW tools and other tools which are build with MinGW
don't work.  There are some strategies to make those tools work such as using
the Perl wrapper or using cygdrive commands in makefiles to convert those pathes
to x:/... format.  The same strategy can be applied to set_soenv but in turn
environment variables which cygwin's tcsh uses don't accept x:/... format.  So
we can't convert all pathes to x:/... format at once.

He had temporary solutions to workaround the above questions.

He thinks there might be some porting issues which is as follows:

1) exception handling
Now he fully utilize gcc's exception handling but he is not sure that this works
with uno-bridge.

2) wchar_t
In gcc, it seems that wchar_t is not compatible with unsigned short int.  He
forcibly cast them.  Both of them have 2 byte length, which should be reconfirmed.
Comment 2 khirano 2004-01-20 01:40:31 UTC
Created attachment 12596 [details]
tono's patch 1
Comment 3 khirano 2004-01-20 01:41:40 UTC
Created attachment 12597 [details]
tono's patch 2
Comment 4 khirano 2004-01-20 01:42:41 UTC
Created attachment 12598 [details]
tono's patch 3
Comment 5 Martin Hollmichel 2004-01-20 07:28:23 UTC
reassigned.
Comment 6 dsherwin 2004-01-20 08:21:00 UTC
Adding myself as cc
Comment 7 foskey 2004-01-20 13:18:30 UTC
Please raise a separate issue for dmake and assign to Waratah.  I will look into
this.
Comment 8 quetschke 2004-01-20 14:27:16 UTC
> 6) dmake built with MinGW still doesn't work.  He uses dmake which was build for
> MSVC+tcsh.  If MinGW built dmake works, we would have to change the strategy to
> change makefiles.

This is the same problem as for the build with a MS compiler and either
the cygwin or the 4NT environment. If you want to use the unixy tools
and POSIX like paths you have to use the "normal" cygwin dmake version.

If you compile dmake with MinGW or in cygwin with "gcc -mno-cygwin", what
is the same, you have to use 4NT as the build shell, this is the way
Viktor started his MinGW port.

I definitely would like to (and will) help on this issue.

vq->waratah. This is not a fix to dmake, it is going throug all *.mk
and cleaning them from the assumption that "WNT" == "MS Compiler".

I'll dig out my patches, check if issue 13888 is still usefull, and see how
far I get with his patches.

A question: Is he using the Mingw standalone installation, or does he use
"gcc -mno-cygwin" and "g++ -mno-cygwin" ?

Volker
Comment 9 vg 2004-01-20 17:07:50 UTC
Hi, I would like to ask you to let me know which problems do we have with this
port and which modules are currently being ported. There could be modules, for
which we should take "unix" way of building, such as sal. As to winapi - that
could be exactly the case of the "Unix" way... The point is we don't need
anything windows-special under Unix, and the MinGW is rather Unix compliant.
Well, in order to avoid making changes in MinGW, I would suggest to consider the
Unix alternative...
I don't understand what does it mean "dmake doesn't work". Could you explain
more detailed?
As to path problem - there is already a tool solenv/bin/guw.pl, which supposed
to handle such problems...
As to uno bridge - I have raised this question, the Unix(linux) brigde port
should be the rigtht and not too complicated thing
Comment 10 khirano 2004-01-21 03:15:06 UTC
Hi waratah, vq and vg,

I am asking tono about dmake and other questions vq and vg raised, please wait
for him.

vg, 
>Well, in order to avoid making changes in MinGW, 
>I would suggest to consider the Unix alternative...
Are you suggesting Unix(Linux)+MingGW can build ooo for Windows?
Have you tried this?

Comment 11 mjevans 2004-01-22 15:42:51 UTC
Not to detract from this important effort, but you might find it easier to build
with the free Digital Mars C++ compiler - a dedicated Windows compiler that
works with all Microsoft SDKs, STLport, etc.  It's totally free, lightning fast,
and much easier to use than MinGW.  The runtime libraries are open-source and
royalty free, as well as native Win32.  I say 'easier' mainly because DMC++ is
very compatible with MSVC++ which is currently used to build OOo on Win32. 
MinGW is not.

http://www.DigitalMars.com
http://biolpc22.york.ac.uk/wx/wxhatch/wxMSW_Compiler_choice.html

The technical support from Walter Bright (the author) is exceptional.  Compiler
performance and runtime speed performance are extremely good.
Comment 12 tono 2004-01-23 13:57:03 UTC
Hi, fellas

vq wrote...

>I'll dig out my patches, check if issue 13888 is still usefull, and see how
>far I get with his patches.

Thank you vq and I will check the issue later on.

>A question: Is he using the Mingw standalone installation, or does he use
>"gcc -mno-cygwin" and "g++ -mno-cygwin" ?

I installed Mingw gcc 3.3.1 and Cygwin in different directory trees and trying 
to build ooo setting Mingw path and using Cygwin's tcsh in a Cygwin window.

vg wrote ...

>Hi, I would like to ask you to let me know which problems do we have with this
>port and which modules are currently being ported. There could be modules, for

Currently the projects in the following list have been built, but none tested.
The list includes those projects that have nothing to do with the compilers.

UnoControls,XmlSearch,accessibility,berkeleydb,bitstream_vera_fonts,boost,
bridges,chaos,codemaker,comphelper,configmgr,cosv,cppu,cppuhelper,cpputools,
crashrep,curl,dtrans,embedserv,eventattacher,expat,external,extras,fileaccess,
fpicker,framework,freetype,helpcontent,i18n_simple,i18npool,i18nutil,icu,
idl,idlc,io,javaunohelper,jpeg,jurt,jut,jvmaccess,moz,nas,neon,offapi,
officecfg,offuh,package,psprint,python,pyuno,rdbmaker,readlicense_oo,regexp
registry,remotebridges,ridljar,rsc,rvpapi,sablot,sal,salhelper,sandbox
sax,scaddins,shell,sj2,so3,soltools,sot,stlport,stoc,store,svtools,sysui
toolkit,tools,transex3,ucb,ucbhelper,udkapi,unoil,unotools,unzip,uui,vcl,vos
wizards,xml2cmp,xmlhelp,xmlscript,zlib

>port and which modules are currently being ported. There could be modules, for
>which we should take "unix" way of building, such as sal. As to winapi - that
>could be exactly the case of the "Unix" way... The point is we don't need
>anything windows-special under Unix, and the MinGW is rather Unix compliant.
>Well, in order to avoid making changes in MinGW, I would suggest to consider 
>the
>Unix alternative...

In most projects, I have modified the make files to act "unix way". However, 
we have many windows specific modules. And of course the primitive actions 
which depend upon operating systems must use WINAPI in windows.

>I don't understand what does it mean "dmake doesn't work". Could you explain
>more detailed?

I do not know exactly but I suspect that it needs many modifications in files 
in solenv/inc/startup. Dmake.exe can be built but it builds nothing.

>As to path problem - there is already a tool solenv/bin/guw.pl, which supposed
>to handle such problems...

I know that but as I have chosen the strategy to use mixed path description 
(x:/.../.../ way), I had to rewrite the script. Actually I do not like to use 
perl wrapper and want to minimize the use. I believe once we can port dmake, 
we can get rid of the script.

All the Best,

Takashi Ono





Comment 13 quetschke 2004-01-23 14:14:25 UTC
>>A question: Is he using the Mingw standalone installation, or does he use
>>"gcc -mno-cygwin" and "g++ -mno-cygwin" ?
>
>I installed Mingw gcc 3.3.1 and Cygwin in different directory trees and trying 
>to build ooo setting Mingw path and using Cygwin's tcsh in a Cygwin window.

Just a comment on this. This is possibly not necessary the -mno-cygwin enables
the "MinGW engine". There _should_ be no differences.


>I know that but as I have chosen the strategy to use mixed path description 
>(x:/.../.../ way), I had to rewrite the script. Actually I do not like to use 
>perl wrapper and want to minimize the use. I believe once we can port dmake, 
>we can get rid of the script.
What do you mean by port dmake? As I tried last time the MinGW compiled
dmake works exactly like the one compiled with a MS compiler. Do you mean
teaching dmake to understand POSIX paths?
Comment 14 tono 2004-01-23 15:32:17 UTC
>>I installed Mingw gcc 3.3.1 and Cygwin in different directory trees and 
trying 
>>to build ooo setting Mingw path and using Cygwin's tcsh in a Cygwin window.
>
>Just a comment on this. This is possibly not necessary the -mno-cygwin enables
>the "MinGW engine". There _should_ be no differences.

Yeah but I still like vanilla.

>What do you mean by port dmake? As I tried last time the MinGW compiled
>dmake works exactly like the one compiled with a MS compiler. Do you mean
>teaching dmake to understand POSIX paths?

Actually I have not noticed that MinGW compiled dmake works, and that it 
exactly works as the one compiled with MSVC. If so, there may be some simpler 
strategy. Exactly my wish was to teach dmake to understand mixed paths and 
provide temporary file path in mixed path to commands.

Takashi Ono

Comment 15 quetschke 2004-01-23 19:06:04 UTC
> Yeah but I still like vanilla.
The reason I started this way was, that I wanted to use the same build
environment as for the "tcsh with MS Compiler" setup. That way you need
cygwin anyway, and if you have cygwin you can also use "gcc -mno-cygwin".
And I like it ;-)

I'll look into the dmake issue and confirm (or not) that Mingw dmake is
100% compatible to the MS compiler case. It was as I did the port, but
that was last year ;-)
Comment 16 tono 2004-01-23 23:11:56 UTC
>The reason I started this way was, that I wanted to use the same build
>environment as for the "tcsh with MS Compiler" setup. That way you need
>cygwin anyway, and if you have cygwin you can also use "gcc -mno-cygwin".
>And I like it ;-)

We need Cygwin anyway, absolutely. We should concern which compiler 
environment is more reliable and up-to-date. Most probably cygwin compiler is 
more reliable but I do not know how w32api update is being ported into both 
environment. Maybe MinGW first?

>I'll look into the dmake issue and confirm (or not) that Mingw dmake is
>100% compatible to the MS compiler case. It was as I did the port, but
>that was last year ;-)

If the dmake built with MinGW is mostly the same as the one built with MSVC, 
it does not work well with tcsh and I think we should do some work with dmake 
anyway, am I wrong?
Comment 17 quetschke 2004-01-24 00:50:41 UTC
> We need Cygwin anyway, absolutely. We should concern which compiler 
> environment is more reliable and up-to-date. Most probably cygwin compiler is 
> more reliable but I do not know how w32api update is being ported into both 
> environment. Maybe MinGW first?
Don't get me wrong, I mean it doesn't matter. Setting the CC (and similar CXX)
variable to either <path to mingw-gcc> or "gcc -mno-cygwin" should not make any
difference. Each time a new Mingw version is released the cygwin packages
are updated (By the MinGW people). The only advantage I might see is that
the cygwin gcc can work with POSIX paths. So just use Mingw, I'll use
gcc -mno-cygwin, I'll see how far I get.

> If the dmake built with MinGW is mostly the same as the one built with MSVC, 
> it does not work well with tcsh and I think we should do some work with dmake 
> anyway, am I wrong?
Absolutely, that is the reason that the W32-tcsh build uses the cygwin
executable.

I'll have a look at the build dmake with Mingw issue now.
Comment 18 quetschke 2004-01-24 02:30:17 UTC
vq->tono: OK, I stumbled across a timezone problem, therefore it took a bit
longer. To build dmake with "gcc -mno-cygwin" do the following. Open a bash, go
to your OOo source directory, then:

$ cd dmake

$ CC='gcc -mno-cygwin' CXX='g++ -mno-cygwin' TZ='' ./configure

$ make

Sorry, at the moment I don't have a pure MinGW installed, but just put
the names for the mingw-gcc compiler where I put the <g?? -mno-cygwin> .

You propably don't need the TZ='', but in a cygwin environment the
configure test for HAVE_UTIME_NULL fails because the mingw library is
not TZ aware.
Comment 19 tono 2004-01-26 14:28:54 UTC
Well, I have made up my mind not to stick to minimizing the use of perl 
wrapper script.

Anyway we have to use the script for the tools using PATH environment variable 
because converting PATH format is very complecated while single path parameter 
can be converted easily by invoking a cygpath command.

It may eliminate a quarter of patches in makefiles.

Takashi Ono
Comment 20 quetschke 2004-01-26 15:06:37 UTC
> Well, I have made up my mind not to stick to minimizing the use of perl 
> wrapper script.
As I invented it for the W32-tcsh (I should call it MSC-tcsh now ;-) ) I totally
agree with you. ;-)

> Anyway we have to use the script for the tools using PATH environment variable 
> because converting PATH format is very complecated while single path parameter 
> can be converted easily by invoking a cygpath command.
Yes.

Comment 21 vg 2004-02-26 16:09:56 UTC
Hi all,

it's alraedy a month passed since last comment in this issue. Are there some
problems where we could be helpful? 
Comment 22 tono 2004-02-29 14:54:19 UTC
I have "built" allthe project leaving some modules using OLE.

The setup does not work yet. There may be some unknown problems.

The following isuues are to be decided.

1. How to cope with bugs and missing APIs in w32api. Should we apply patches 
tp mingw headers or just modify ooo source files.

2. How to cope with the bug in --enable-runtime-pseudo-reloc. I have applied a 
patch ( https://sourceforge.net/tracker/?
func=detail&atid=302435&aid=844566&group_id=2435 ) to binutils but I am afraid 
the patch is not so sophisticated and may cause other bugs.

3. How to implement OLE without using ATL library. Currently I have no good 
solution.

4. How to implement C++ <-> uno bridge. I have enabled g++ native RTTI but I 
do not know it works well.
Comment 23 vg 2004-03-01 13:14:20 UTC
Hi,
I have talked to the projects owners about these problems, and here are the answers:
1. Apply patches is the preferable way. I think, the main idea of mingw is to
make it possible to build code written for windows with gcc compiler - so to
patch the compiler header would be the right way.
2. As far I have understood, the "--enable-runtime-pseudo-reloc" bug is just
about missing entries in library import table. I do not think that requires
sophisticated changes. What make you so distrustful? Do we have another choice?
3. OLE without using ATL library... Actually, this library functionality should
be implemented, but(!!) it's not vital for the office. So, we can just ignore
the modules where it's needed, and first just bring the office to fly. As soon
we achieved this goal, we can investigate this problem more closely.
4. As I already told, we should choose the UNIX way. If the hypotheses that
MinGW generate a similar code as GCC 3 is wright, than we may use (or try to
use) the linux bridge for GCC. It's located in
bridges/source/cpp_uno/gcc3_linux_intel
It's most likely working.
Vladimir
Comment 24 tono 2004-03-01 22:06:58 UTC
Hi, Vladimir,

Thank you for your help.

 >4. As I already told, we should choose the UNIX way. If the hypotheses that
 >MinGW generate a similar code as GCC 3 is wright, than we may use (or try to
 >use) the linux bridge for GCC. It's located in
 >bridges/source/cpp_uno/gcc3_linux_intel
 >It's most likely working.

The problem is that we have no dlopen function in win32. The unix c++ <-> uno 
bridge is using this to build hash table to identify exception type.

Takashi 
Comment 25 Daniel Boelzle [:dbo] 2004-03-04 13:42:27 UTC
@tono:
The dlopen()/dlsym() functions are used to find the RTTI symbols for exception
throwing.  The dlopen() is just used to get the application handle.  Try to use
Windows API for this, e.g. LoadLibrary()/GetProcAddress().
[BTW: I was expecting that MinGW uses Windows kernel-based structured exception
handling (SEH), so that you ought to reuse/adopt the MS Visual C++ compiler
binding code from cpp_uno/msvc_w32_intel/except.cxx.]
Comment 26 tono 2004-03-07 06:07:49 UTC
Hi, dbo,

Unfortunately MingW does not seem to be using MS-Windows kernel based SEH.

>The dlopen()/dlsym() functions are used to find the RTTI symbols for exception
>throwing.  The dlopen() is just used to get the application handle.  Try to 
use
>Windows API for this, e.g. LoadLibrary()/GetProcAddress().

The problem is that we do not know the module name. I think we should always 
just "generate" rtti info for uno exceptions from the uno name.
Comment 27 tono 2004-03-08 14:48:16 UTC
I have made correction in c++ <-> uno bridges and the setup is now working. 
writer and calc seem to be working.

The left issues are as follows;

1. OLE
OLE is not implemented.

2. Title Bar problem
Probably from some poor porting, the captions in the title bars in all windows 
are garbled.

3. Threading in python
I have implemented POSIX threading in python but it requires distribution of 
the external library. I think we should implement windows native threading 
instead so that we can keep minimal set.

4. Porting strategy
Currrently I have made some modification in ooo sources to cover up mingw bugs 
and they have to be substituted by patches for mingw headers.

5. Based release
I am still working with 1.1 and the work should be transfered to 1.1.1
Comment 28 khirano 2004-03-08 20:16:21 UTC
tono wrote:
> I have made correction in c++ <-> uno bridges
> and the setup is now working. 
> writer and calc seem to be working.

Wow!!! Great News!!!  You made it, tono!!!  Thank you very much.
Let us document all what you have done.
I really would like to help create the documentation.
Comment 29 tono 2004-03-21 03:39:53 UTC
Hi, fellas,

I have modified python to use NT native threading directly instead of through 
pthread library. Now I am free.

I am now seperating patches for mingw headers and transfering my works into 
1.1.1.

I had to implement a new tricky hack in dllentry in sal project as mingw has 
no hook point before calling static object constructors in initialization.

Although Ihave not discovered Title Bar Problems and OLE issue is not solved, 
I think I can disclose my local patches in a couple of weeks.

All the Best,

Takashi Ono
Comment 30 maison.godard 2004-03-29 12:24:40 UTC
adding myself to CC 
Comment 31 tono 2004-04-03 02:07:32 UTC
Created attachment 14293 [details]
Patches for MINGW headers
Comment 32 tono 2004-04-03 02:08:59 UTC
Created attachment 14294 [details]
Patches for solenv
Comment 33 tono 2004-04-03 02:09:49 UTC
Created attachment 14295 [details]
Patches for project makefiles
Comment 34 tono 2004-04-03 02:11:15 UTC
Created attachment 14296 [details]
Patches for project source files, delivery lists, map files etc.
Comment 35 tono 2004-04-03 02:12:29 UTC
Created attachment 14297 [details]
Additional patch
Comment 36 tono 2004-04-03 02:24:59 UTC
Hi fellas,

I have got through with 1.1.1rc, reorganized my patches and uploaded them.

Although Title Bar problem and OLE issue are not solved yet, now I can build 
the installation set and it works.

Please note that I am installing mingw in a seperate tree and not using cygwin 
compiler when building projects. I have to use cygwin compiler when building 
dmake by adding cygwin path in bootstrap shell script.

Beside some patches for headers, I also rebuilt binutils in mingw tree with 
patches to avoid pseudo-runtime-reloc bug and rebuilt libmsvcrt.a.

Regards,

Takashi Ono

Comment 37 tono 2004-04-03 02:32:24 UTC
I have added a few files and some of them are based on existing files.

Please run following commands before applying my patches.

cp -p ${ORIGINAL_SRC_ROOT}/sal/systools/win32/uwinapi/uwinapi.dxp 
sal/systools/win32/uwinapi/uwinapi_mingw.dxp
cp -p ${ORIGINAL_SRC_ROOT}/sal/systools/win32/uwinapi/unicows.dxp 
sal/systools/win32/uwinapi/unicows_mingw.dxp
cp -p ${ORIGINAL_SRC_ROOT}/cppuhelper/source/gcc3_linux_intel.map 
cppuhelper/source/mingw.map
cp -p ${ORIGINAL_SRC_ROOT}/psprint/util/libpsp_linux.map 
psprint/util/libpsp_mingw.map
rm -rf bridges/source/cpp_uno/mingw_intel
cp -Rp ${ORIGINAL_SRC_ROOT}/bridges/source/cpp_uno/gcc3_linux_intel 
bridges/source/cpp_uno/mingw_intel

Regards,

Takashi Ono
Comment 38 tono 2004-04-03 02:44:21 UTC
Foryour information, MinGW-3.1.0-1.exe, gcc-core-3.3.1-20030804-1.tar.gz, gcc-
g++-3.3.1-20030804-1.tar.gz and w32api-2.5.tar.gz are installed in my 
environment for build.

For rebuilding binutils and libmsvcrt.a, MSYS-1.0.9.exe, msysDTK-1.0.1.exe, 
binutils-2.13.90-20030111-1-src.tar.gz and w32api-2.5-src.tar.gz are installed 
as well

Regards,

Takashi Ono
Comment 39 quetschke 2004-04-03 15:43:09 UTC
Congratulations!!!!!!!!

Do you already have filed a Joint Copyright Assignment?

If yes, Martin can we please get a cws to integrate this work?
Comment 40 tono 2004-04-04 00:14:02 UTC
vq wrote...
 >Congratulations!!!!!!!!

Thank you!

 >Do you already have filed a Joint Copyright Assignment?

Certainly yes, though I have not yet joined porting project.

Regards,

Takashi Ono
Comment 41 tono 2004-04-04 08:40:20 UTC
I have found out that Title Bar Problem is caused by linking unicows.dll to 
uwinapi.dll in sal project. As unicows.lib does not work with mingw, I have 
built import archives for unicows.dll but it is not working.

Actually linking with unicows.lib with MS linker does not link unicows.dll! 
Unicows.lib seems to be made with some tricks.

I have found libunicows project on the web. Shall we use this one?

Your comments will be appreciated.

Regards,

Takashi Ono
Comment 42 quetschke 2004-04-04 18:16:51 UTC
Hi tono,

> I have found libunicows project on the web. Shall we use this one?

That depends on their licence and if it works. ;)

This evening I'll try to build OOo following your instructions and patches.

Greetings,

    Volker
Comment 43 quetschke 2004-04-04 18:18:48 UTC
vq->tono: What commandline did you use to generate your winmingw.set?
Comment 44 tono 2004-04-04 22:15:54 UTC
 >> I have found libunicows project on the web. Shall we use this one?
 >That depends on their licence and if it works. ;)

As SourceForge was sleeping, I have not confirmed yet. The google cache says 
the licence is MIT licence.

Takashi Ono
Comment 45 tono 2004-04-04 22:22:35 UTC
 >vq->tono: What commandline did you use to generate your winmingw.set?

export PATH=${MINGW_HOME}/bin:$PATH
(cd config_office && ./configure --with-mingwin=yes --with-lang=JAPN --with-
jdk-home=${JV_HOME} --with-dict=ALL --with-ant-home=${ANT_HOME} --enable-
crashdump --enable-symbols=SMALL

Takashi Ono
Comment 46 tono 2004-04-05 15:58:36 UTC
Now I understand that unicows.lib is a static library with thunk codes rather 
than a simple import library. As uwinapi has thunk code internally, I think it 
better to implement "selective" thunk for unicows.dll inside uwinapi.dll 
instead of linking with unicows.lib (or libunicows.a).

Regards,

Takashi Ono
Comment 47 quetschke 2004-04-05 17:25:12 UTC
I'm streamlining the config_office patches at the moment. I'll open a new issue
when they work. I'm using the native Mingw compiler ATM, but in the end
it should also be possible to use gcc -mno-cygwin.

I think we need a different solution then patching the mingw include files,
eiher get the patches in the upstream mingw distribution, or create
an extra include file for mingw that we include via sal/inc/sal/config.h.

Volker
Comment 48 quetschke 2004-04-05 17:59:18 UTC
Hi!

The mingw_headers.patch fails because there is no include/winres.h.

From your patch I see (?) that you have created a winres.h by copying
winresrc.h.
Comment 49 quetschke 2004-04-05 19:10:04 UTC
Hi, where did you get your rc from?

I'm building on a MS compiler free system and therefore don't have a rc.exe.

Error:
guw.pl rc -DWIN32 -I -I.  -I. -I../inc -I../../../inc -I../../../WIN/inc
-I../../../wntgcci.pro/inc -I.
(snip)
../../../wntgcci.pro/misc/uwinapi_def.rc
Command: rc
Can't exec "rc": No such file or directory at
/cygdrive/d/w1/OOo111mingw/solenv/bin/guw.pl line 273.

Error: guw.pl: executing rc failed!

Error: guw.pl: executing rc failed!
dmake:  Error code 2, while making '../../../wntgcci.pro/bin/uwinapi.dll'
echo: No match.

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/OOo111mingw/sal/systools/win32/uwinapi
Comment 50 tono 2004-04-05 21:50:20 UTC
tono -> vq

I have Winresrc.h and rc.exe in my PSDK tree. Don't you?
Comment 51 quetschke 2004-04-05 22:22:50 UTC
> I have Winresrc.h and rc.exe in my PSDK tree. Don't you?
Argh! Yes I have rc.exe. (But not in my path.)

I can tell you now, that it should be possible to use windres.exe from
MinGW or cygwin, but _tg_shl.mk produces lots -I. parameters, rc.exe can
work with them, windres cannot.
Comment 52 tono 2004-04-05 22:32:30 UTC
vq@openoffice.org wrote...
 >The mingw_headers.patch fails because there is no include/winres.h.

The patch should have been omitted from the mingw_headers.patch.

I decided to create it in solenv/inc at the last moment and added the patch in 
solenv_mingw.patch.

Sorry for my mistake.

I will update mingw_headers.patch.

Takashi Ono
Comment 53 tono 2004-04-05 22:34:21 UTC
Created attachment 14346 [details]
Patches for MINGW headers (updated)
Comment 54 quetschke 2004-04-06 01:34:57 UTC
Hi!

I'm stuck in sal a the moment, depending on the order of the build (build.lst
problem) I get either:
-----------
dlltool --input-def ../../../wntgcci.pro/misc/uwinapi.def --dllname uwinapi.dll
--kill-at --output-exp ../../../wntgcci.pro/misc/uwinapi.exp
guw.pl gcc -mno-cygwin -nostdlib -Wl,--enable-runtime-pseudo-reloc
-L../../../wntgcci.pro/lib -L../../../wntgcci.pro/slb -L. -L. -L
(snip)
-Wl,../../../wntgcci.pro/misc/uwinapi.exp -lmingw32 -lgcc -lunicows -lkernel32
-luser32 -ladvapi32 -lversion -lmsvcrt
-Wl,-Map,../../../wntgcci.pro/misc/uwinapi.map
Command: gcc
c:\MinGW\bin\..\lib\gcc-lib\mingw32\3.3.1\..\..\..\..\mingw32\bin\ld.exe: cannot
find -lunicows
dmake:  Error code 1, while making '../../../wntgcci.pro/bin/uwinapi.dll'
echo: No match.

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/OOo111mingw/sal/systools/win32/uwinapi 
-----------
or
-----------
Making: ../../wntgcci.pro/obj/signal.obj
guw.pl gcc -mno-cygwin -fmessage-length=0 -c -Wall -I-I. -I. -I../inc
-I../../inc -I../../WIN/inc -I../../wntgcci.pro/inc -I.
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc/dont_use_stl
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc/external
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc
-I/cygdrive/d/w1/OOo111mingw/solenv/wntgcci/inc
-I/cygdrive/d/w1/OOo111mingw/solenv/inc -I/cygdrive/d/w1/OOo111mingw/res
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc/dont_use_stl
-I/cygdrive/c/j2sdk1.4.1_02/include/win32 -I/cygdrive/c/j2sdk1.4.1_02/include
-I/cygdrive/c/MinGW/include
-I/cygdrive/c/MinGW/lib/gcc-lib/mingw32/3.3.1/include
-I/cygdrive/c/MinGW/include/c++/3.3.1
-I/cygdrive/c/MinGW/include/c++/3.3.1/mingw32
-I'/cygdrive/d/psdk02_2003/include' -I. -I../../res -I.    -nostdinc -O3   -pipe
-march=pentiumpro -DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_MT -D_DLL  -DWNT
-DWNT -DNT351 -DGCC -DC300 -DINTEL
-DGXX_INCLUDE_PATH=/cygdrive/c/MinGW/include/c++/3.3.1 -D_USE_NAMESPACE
-D_M_IX86 -DSTLPORT_VERSION=450 -D_STLP_USE_DYNAMIC_LIB -DCPPU_ENV=gcc3
-DSUPD=645 -DBUILD=8762 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0
-DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DSRX645  -DMULTITHREAD  
-o../../wntgcci.pro/obj/signal.obj signal.c
(snip)
Command: gcc
In file included from signal.c:73:
../../inc/systools/win32/uwinapi.h:62:9: warning: #pragma once is obsolete
signal.c: In function `InitSignal':
signal.c:99: error: `pfn_ADDEREXCLUDEDAPPLICATIONW' undeclared (first use in
this function)
signal.c:99: error: (Each undeclared identifier is reported only once
signal.c:99: error: for each function it appears in.)
signal.c:99: error: parse error before "pfn"
signal.c:100: error: `pfn' undeclared (first use in this function)
signal.c:101: error: `pfn' used prior to declaration
signal.c:101: warning: implicit declaration of function `pfn'
signal.c: In function `ReportCrash':
signal.c:169: warning: unsigned int format, DWORD arg (arg 5)
signal.c:169: warning: unsigned int format, DWORD arg (arg 7)
signal.c: At top level:
signal.c:226: warning: static declaration for `SignalHandlerFunction' follows
non-static
signal.c: In function `SignalHandlerFunction':
signal.c:270: warning: suggest parentheses around && within ||
signal.c:294: warning: enumeration value `osl_Signal_ActIgnore' not handled in
switch
signal.c:294: warning: enumeration value `osl_Signal_Act_FORCE_EQUAL_SIZE' not
handled in switch
dmake:  Error code 1, while making '../../wntgcci.pro/obj/signal.obj'
dmake:  '../../wntgcci.pro/obj/signal.obj' removed.
echo: No match.

ERROR: Error 65280 occurred while making /cygdrive/d/w1/OOo111mingw/sal/osl/w32
dmake:  Error code 1, while making 'build_all'
echo: No match.
-----------

I guess the first error is the "--enable-runtime-pseudo-reloc" problem in
binutils, I'll rebuild them now with the patch.
Comment 55 quetschke 2004-04-06 15:04:57 UTC
OK, nice to have the new binutils, but that wasn't the problem.

unicows.lib was missing, I added the lib directory of the PSDK
(version 02/2003, which one do you use?) to the end of LIB and ILIB,
but now I get:

------
guw.pl gcc -mno-cygwin -nostdlib -Wl,--enable-runtime-pseudo-reloc
-L../../../wntgcci.pro/lib -L../../../wntgcci.pro/slb -L. -L. -L
-L/cygdrive/d/w1/OOo111mingw/solver/645/lib 
(snip)
../../../wntgcci.pro/misc/uwinapi_res.o
-Wl,../../../wntgcci.pro/misc/uwinapi.exp -lmingw32 -lgcc -lunicows -lkernel32
-luser32 -ladvapi32 -lversion -lmsvcrt
-Wl,-Map,../../../wntgcci.pro/misc/uwinapi.map
Command: gcc
..\..\..\wntgcci.pro\misc\uwinapi.exp(.edata+0x38):fake: undefined reference to
`AddFontResourceW@4'
..\..\..\wntgcci.pro\misc\uwinapi.exp(.edata+0x3c):fake: undefined reference to
`AddJobW@20'
..\..\..\wntgcci.pro\misc\uwinapi.exp(.edata+0x40):fake: undefined reference to
`AddPortW@12'
(snip)
..\..\..\wntgcci.pro\misc\uwinapi.exp(.edata+0x7d4):fake: undefined reference to
`midiInGetErrorTextW@12'
..\..\..\wntgcci.pro\misc\uwinapi.exp(.edata+0x7d8):fake: undefined reference to
`sndPlaySoundW@8'
dmake:  Error code 1, while making '../../../wntgcci.pro/bin/uwinapi.dll'
echo: No match.

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/OOo111mingw/sal/systools/win32/uwinapi
dmake:  Error code 1, while making 'build_all'
echo: No match.
------

Any hints? These missing symbols look like the ones you add with your patch
to sal/systools/win32/uwinapi/unicows_mingw.dxp.
Comment 56 tono 2004-04-06 16:31:55 UTC
vq@openoffice.org wrote...
 >unicows.lib was missing, I added the lib directory of the PSDK
 >(version 02/2003, which one do you use?) to the end of LIB and ILIB,

We cannot link uwinapi with unicows.lib. As I wrote, I made libunicows.a as an 
import archive. It does not work but at least we can proceed with build.

I added new makefiles.mk in external/unicows, which will create libunicows.a. 
Don't you have it built?
 
Best Regards,

Takashi Ono
Comment 57 quetschke 2004-04-06 19:55:11 UTC
> I added new makefiles.mk in external/unicows, which will create libunicows.a.
> Don't you have it built?

There is a dependency missing in sal:
--- sal/prj/build.lst	16 Jul 2003 17:22:09 -0000	1.15
+++ sal/prj/build.lst	6 Apr 2004 17:43:01 -0000
@@ -1,4 +1,4 @@
-sa	sal	:	xml2cmp NULL 
+sa	sal	:	xml2cmp external NULL  

With this it builds sal/systools/win32/uwinapi but breaks then in sal/osl/w32
when compiling signal.c.
Comment 58 quetschke 2004-04-06 20:18:01 UTC
Hi again, sorry for the noise, I lost my patches to mingw/include/ somehow.
After reapplying them the build continues.

Apropos patch, your new mingw_headers.patch gives:
patching file include/winres.h
patch: **** unexpected end of file in patch

No wonder, you just cut of the last lines.

> The mingw_headers.patch fails because there is no include/winres.h.
> From your patch I see (?) that you have created a winres.h by copying
> winresrc.h.
But my lines above mean that there was no winres.h in my c:/mingw/include
directory. I copied include/winresrc.h to include/winres.h and then your
(old) patch applied cleanly.
Comment 59 quetschke 2004-04-06 22:38:57 UTC
I tripped over another problem.

Project udkapi starts the fresh build idlc.exe, but idlc.exe seems to use uwinapi
and I get a popup box which says:

Header: idlc.exe - Entry Point Not Found
Window: The procedure entry point BeginUpdateResourceA could ot be located
in the dynamic link library unicows.dll.

I'll start a fresh rebuild from scratch ....
Comment 60 quetschke 2004-04-08 00:04:40 UTC
I created issue 27582 for the integration of the patches to config_office/ .

vq->tono: Any idea concerning the idlc.exe popup box?
Comment 61 tono 2004-04-10 14:32:09 UTC
Created attachment 14458 [details]
Patches for MINGW headers (updated April 10,2004)
Comment 62 tono 2004-04-10 14:33:33 UTC
Created attachment 14459 [details]
Patches for project makefiles (updated April 10,2004)
Comment 63 tono 2004-04-10 14:35:56 UTC
Created attachment 14460 [details]
Patches for solenv (updated April 10,2004)
Comment 64 tono 2004-04-10 14:36:49 UTC
Created attachment 14461 [details]
Patches for project source files, delivery lists, map files etc.
Comment 65 tono 2004-04-10 14:43:03 UTC
I have corrected winres.h patch.

I also implemented unicows thunk codings in 
sal/systools/win32/uwinapi/ResolbeThunk.cpp and removed wrong patches in 
external project.

Either libunicows.a or unicows.lib is no longer needed in mingw build and 
removed from framework project as well.

>vq
I suspect idlc.exe popup problem should also resolved.

Best Regards,

Takashi Ono
Comment 66 khirano 2004-04-11 12:44:29 UTC
Curvirgo, a member of the ja mingw port team, have just found that
cws_srx645_mingw was tagged.  Does it have all 1.1.1 modules and files with all
updated patches applied?  
Comment 67 quetschke 2004-04-11 14:56:18 UTC
> Curvirgo, a member of the ja mingw port team, have just found that
> cws_srx645_mingw was tagged.  Does it have all 1.1.1 modules and files with all
> updated patches applied?

No, nothing is committed right now. I requested this cws from Martin to commit
checked and approved patches.

The patches have to be split to more reasonable sizes and reviewed.
I'll commit the config_office part (issue 27582) shortly and will
continue with solenv.

I'd appreciate help in splitting up the patches in smaller units
to let the review process progress faster.

vq->tono: My build stopped in shell with the error below. I found
a binutils problem in the web, see
<http://sources.redhat.com/ml/binutils/2001-07/msg00113.html>
but this patch doesn't help.

Any hints are appreciated!

------------------------------
Making: ../../../wntgcci.pro/bin/shlxthdl.dll
guw.pl /cygdrive/c/MinGW/bin/gcc -c
-o../../../wntgcci.pro/slo/shlxthdl_version.obj -DWNT 
-I../../../wntgcci.pro/inc /cygdrive/d/w1/OOo111mingw/solenv/src/version.c
Command: /cygdrive/c/MinGW/bin/gcc
guw.pl rc -DWIN32 -I -I.  -I. -I../inc -I../../../inc -I../../../WIN/inc
-I../../../wntgcci.pro/inc -I.
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc/stl
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc/external
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc
-I/cygdrive/d/w1/OOo111mingw/solenv/wntgcci/inc
-I/cygdrive/d/w1/OOo111mingw/solenv/inc -I/cygdrive/d/w1/OOo111mingw/res
-I/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/inc/stl
-I/cygdrive/c/j2sdk1.4.1_02/include/win32 -I/cygdrive/c/j2sdk1.4.1_02/include
-I/cygdrive/c/MinGW/include
-I/cygdrive/c/MinGW/lib/gcc-lib/mingw32/3.3.1/include
-I/cygdrive/c/MinGW/include/c++/3.3.1
-I/cygdrive/c/MinGW/include/c++/3.3.1/mingw32
-I'/cygdrive/d/psdk02_2003/include'     -I. -I../../../res -I. 
../../../wntgcci.pro/misc/shlxthdl_def.rc
Command: rc
cat ../../../wntgcci.pro/res/49/shlxthdl.res
../../../wntgcci.pro/misc/shlxthdl_def.res > ../../../wntgcci.pro/misc/shlxthdl.res
windres ../../../wntgcci.pro/misc/shlxthdl.res
../../../wntgcci.pro/misc/shlxthdl_res.o
c:\MinGW\bin\windres.exe: ../../../wntgcci.pro/misc/shlxthdl.res: unexpected end
of file
dmake:  Error code 1, while making '../../../wntgcci.pro/bin/shlxthdl.dll'
echo: No match.

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/OOo111mingw/shell/source/win32/shlxthandler
--------------------------------------------------
Comment 68 tono 2004-04-12 14:17:15 UTC
vq@openoffice.org wrote...
 >vq->tono: My build stopped in shell with the error below. I found
 >a binutils problem in the web, see
 ><http://sources.redhat.com/ml/binutils/2001-07/msg00113.html>
 >but this patch doesn't help.
 >
 >Any hints are appreciated!

tono->vq: I have to apologize not to have mentioned winres.exe modification.

I made modification so that winres can process concatenated .res files (with 
multiple resource headers). Microsoft tools can handle them as valid .res 
files, winres cannot.

In the meantime, the issue can be solved by modifying solenv/inc/_?tg_
(app|shl).mk.
I wonder whether is the more sophisticated solution.

Anyways I will upload the patch for winres.

Regards,

Takashi Ono

Comment 69 khirano 2004-04-12 14:22:55 UTC
I started my mingw ooo building on Windows98SE.
;)
./configure --with-mingwin=yes
produced:
checking for gawk... gawk
checking for gawk... /bin/gawk
checking for sed... /bin/sed
checking the operating system... configure: error: MINGW32_98-4.10
operating system is not suitable to build OpenOffice.org!

What is the operating system requirement for mingw ooo building?
Comment 70 tono 2004-04-12 14:30:07 UTC
vq@openoffice.org wrote...
 >vq->tono: My build stopped in shell with the error below. I found
 >a binutils problem in the web, see
 ><http://sources.redhat.com/ml/binutils/2001-07/msg00113.html>
 >but this patch doesn't help.
 >
 >Any hints are appreciated!

tono->vq: I have to apologize not to have mentioned winres.exe modification.

I made modification so that winres can process concatenated .res files (with 
multiple resource headers). Microsoft tools can handle them as valid .res 
files, winres cannot.

In the meantime, the issue can be solved by modifying solenv/inc/_?tg_
(app|shl).mk.
I wonder whether is the more sophisticated solution.

Anyways I will upload the patch for winres.

Regards,

Takashi Ono

Comment 71 tono 2004-04-12 14:31:15 UTC
Created attachment 14477 [details]
Patch for windres.exe
Comment 72 quetschke 2004-04-13 04:24:49 UTC
With your patch the build continued.

I found another requirement, the build requires MASM, I'll update
the config_office patch, but then the build stopped again in
 setup2/source/custom/moffice
with the error below. I'am using binutils-2.13.90-20030111-1-src.tar.gz
patched with pseudo-reloc.diff and resres.c.patch.

Ideas?

-------------------------------------------------- 
cat ../../../wntgcci.pro/misc/mig645gi_def.res >
../../../wntgcci.pro/misc/mig645gi.res
windres ../../../wntgcci.pro/misc/mig645gi.res
../../../wntgcci.pro/misc/mig645gi_res.o
guw.pl /cygdrive/c/MinGW/bin/gcc -nostdlib -Wl,--enable-runtime-pseudo-reloc
-L../../../wntgcci.pro/lib -L../../../wntgcci.pro/slb -L. -L. -L
-L/cygdrive/d/w1/OOo111mingw/solver/645/lib
-L/cygdrive/d/w1/OOo111mingw/solver/645/wntgcci.pro/lib
-L/cygdrive/d/w1/OOo111mingw/solenv/wntgcci/lib -L/cygdrive/c/j2sdk1.4.1_02/lib
-L/cygdrive/c/MinGW/lib -Wl,--enable-stdcall-fixup -mconsole -shared --warn-once
/cygdrive/c/MinGW/lib/dllcrt2.o -o../../../wntgcci.pro/bin/mig645gi.dll
../../../wntgcci.pro/slo/mig_dflt_version.obj
../../../wntgcci.pro/slo/mig_dflt_description.obj
../../../wntgcci.pro/slo/arch.obj ../../../wntgcci.pro/slo/sifsys.obj
../../../wntgcci.pro/slo/winos.obj ../../../wntgcci.pro/misc/mig645gi_res.o
../../../wntgcci.pro/slo/moffice.obj ../../../wntgcci.pro/slo/migplug.obj
../../../wntgcci.pro/slo/sicustom.obj
-Wl,../../../wntgcci.pro/lib/libmig645gi.exp -lunzipdll_static -lvcl645gi
-ltl645gi -lcppuhelper3gcc3 -lcppu -lsal -luwinapi -ladvapi32 -lgdi32 -lshell32
-lole32 -luuid -lversion -lwinmm -lstlport_gcc -lstdc++ -lmingw32 -lgcc
-lmoldname -luwinapi -lm -lkernel32 -luser32 -lmsvcrt -lcrtdll -lmingwthrd
-Wl,-Map,../../../wntgcci.pro/misc/mig645gi.map
Command: /cygdrive/c/MinGW/bin/gcc
Info: resolving __timezone by linking to __imp___timezone (auto-import)
fu000001.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
fu000002.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm___timezone'
dmake:  Error code 1, while making '../../../wntgcci.pro/bin/mig645gi.dll'
echo: No match.

ERROR: Error 65280 occurred while making
/cygdrive/d/w1/OOo111mingw/setup2/source/custom/moffice
dmake:  Error code 1, while making 'build_all'
echo: No match.

-------------------------------------------------- 
Comment 73 tono 2004-04-13 05:23:04 UTC
tono->vq: You have to rebuild libmsvcrt.a in mingw winapi with patched binutils.
Comment 74 vg 2004-04-13 10:22:56 UTC
Hi,
the is a branch cws_src680_mingwcws, based on src680, the next release. Of
cause, it will contain all 1.1.1 modules and files... I'm responsible for this
port,so this week I'm planning to apply patches and review the changes. Please
contact me, if there is any problems.
Comment 75 vg 2004-04-13 14:16:17 UTC
vg->vq the problem with the SRX645 branched version is that it's -apparently-
not gone be merged in SRC680 (next release). So, we should apply the patches to
the SRC680 sources, even if it's not so convenient.
What to do: just let me know which modules are sufficient for the port, and I'll
ensure right branch for them.
Comment 76 quetschke 2004-04-13 23:13:07 UTC
> vg->vq the problem with the SRX645 branched version is that it's -apparently-
> not gone be merged in SRC680 (next release). So, we should apply the patches
> to the SRC680 sources, even if it's not so convenient.

@vg: Sorry, this mail took ~12h until it reached me. As I wrote in the meantime
in dev@porting, I don't have a problem with cws_srx645_mingw *NOT* being
integrated at in SRX645. But at the moment I'm toying with 600kb patches
and filterdiff to manage this stuff. I'd really like to commit Takashis
patches and the few changes I made into that cws. It will be buildable from
the beginning, that is something that we won't have when we start with any
SRC680 branch.

And it is always easy to generate patchsets by diffing the cws against its
 _ANCHOR. Let me repeat: Working without a cvs repository sucks!

> What to do: just let me know which modules are sufficient for the port,
> and I'll ensure right branch for them.

The following, plus config_office is the list of patched modules:
(lsdiff --strip=1 MW.diff | sed 's/\/.*//'|sort|uniq)
UnoControls
accessibility
autodoc
automation
basic
berkeleydb
boost
bridges
codemaker
comphelper
configmgr
connectivity
cosv
cppuhelper
crashrep
curl
dbaccess
desktop
dmake
dtrans
embedserv
eventattacher
expat
extensions
external
fileaccess
filter
forms
fpicker
framework
goodies
i18n
i18n_simple
i18npool
i18nutil
icu
idl
idlc
io
javaunohelper
jpeg
jurt
jvmaccess
lingucomponent
linguistic
moz
neon
np_sdk
odk
offmgr
package
padmin
psprint
python
pyuno
regexp
registry
remotebridges
rsc
sablot
sal
salhelper
sax
sc
scaddins
sch
scp
scptools
sd
setup2
sfx2
shell
sj2
so3
solenv
soltools
starmath
stlport
stoc
store
svtools
svx
sw
sysui
testtools
tools
ucb
ucbhelper
udm
unotools
unzip
vcl
vos
xml2cmp
xmlhelp
xmloff
xmlscript
zlib 
Comment 77 khirano 2004-04-15 00:01:23 UTC
khirano wrote:
> I started my mingw ooo building on Windows98SE.
> ... configure: error: MINGW32_98-4.10

I was trying to build ooo on msys.  This is wrong.
I didn't read tono's comment correctly.
The correct way to do is as follows:

1) build dmake with cygwin's gcc.
2) change the PATH to /cygdrive/c/MinGW/bin (in my case)
3) then build ooo with mingw's gcc on cygwin

This worked and dmake started building ooo!!  Wow!
This was the first time for me to hit dmake on Windows98SE.  Impressive.;)

Now the build stopped at soltools/ldump.
Couldn't compile hashtbl.cxx.

C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx:191:
error: `strlen' undeclared (first use this function)
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx: In member
function `HashItem* HashTable::FindPos(const char*) const':
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx:280:
error: `strcmp' undeclared (first use this function)
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx: In member
function `void* HashTable::Find(const char*) const':
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx:338:
error: `strcmp' undeclared (first use this function)
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx: In member
function `void* HashTable::Delete(const char*)':
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx:356:
error: `strcmp' undeclared (first use this function)
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx: In member
function `void HashTable::SmartGrow()':
C:/cygwin/home/hirano/oo_1.1.1_src/soltools/ldump/hashtbl.cxx:391:
error: syntax error before `long'
dmake: Error code 1, while making '../wntgcci.pro/obj/hashtbl.obj'dmake:
'../wntgcci.pro/obj/hashtbl.obj' removed.
echo: No match.
ERROR: Error 65280 occurred while making
/home/hirano/oo_1.1.1_src/soltools/ldump
[hirano@aptiva ~/oo_1.1.1_src/soltools]$
Comment 78 quetschke 2004-04-15 02:53:27 UTC
Hi khirano,

What to do (short summary)

(You need to fullfil all requirements as for the W32-tcsh build, even MASM,
but you don't need the Microsoft compiler, see:
<http://tools.openoffice.org/dev_docs/build_windows_tcsh.html>) 

* Build patched binutils and libmsvcrt.a for MinGW.
  Patch with resres.c.patch and
<https://sourceforge.net/tracker/?func=detail&atid=302435&aid=844566&group_id=2435>
  
  (You need mingw-runtime-3.2-src.tar.gz and w32api-2.5-src.tar.gz)
  ((To build you need bison and flex, but remove them from the path before
    you start the OOo build.)

* Patch your mingw/include files with:
    mingw_headers.patch

* Patch your OOo sources with (only the newest versions):
    ldump_hashtbl_cxx_mingw.patch
    makefiles_mingw.patch
    solenv_mingw.patch
    others_mingw.patch

* Revert the patch for
    readlicence_oo and config_office, apply the patch from issue 27582.
    (You don't have to use the MW_config_office_neu2.diff patch, then you
     don't have to generate configure by yourself, but I enhanced the
     checks for the build requirement for MinGW already)

* Patch sal/prj with:
--- sal/prj/build.lst	16 Jul 2003 17:22:09 -0000	1.15
+++ sal/prj/build.lst	6 Apr 2004 17:43:01 -0000
@@ -1,4 +1,4 @@
-sa	sal	:	xml2cmp NULL 
+sa	sal	:	xml2cmp external NULL 
 sa	sal										usr1	-	all	sa_mkout NULL
 sa	sal\cpprt								nmake	-	u	sa_cpprt sa_util NULL
 sa	sal\systools\macxp_extras\x11osx			nmake	-	u	sa_mxpext_x11osx NULL

* start a bash, cd into your OOo source dir and then into config_office,
  create a new configure with autoconf.
$ config_office

$ autoconf

$ cd ..

I recommend that you use a path that is as short as possible, but that includes
the Platform SDK Bin directory, e.g.:
$ export
PATH=/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/psdk02_2003/Bin

Now configure, e.g.:
./configure  --with-mingwin=/cygdrive/c/MinGW
--with-jdk-home=/cygdrive/c/j2sdk1.4.1_02
--with-ant-home=/cygdrive/c/ant-1.5.3-1 --with-psdk-home=/cygdrive/d/psdk02_2003

* Now start a tcsh
$ tcsh

* Set your environment variables:
$ source winmingw.set

* build dmake
$ ./bootstrap

* Rehash your path
$ rehash

* Build OOo
$ dmake

And now wait. ... I forgot to say, I finally stopped my efforts to build
on a system with only 256MB ram, the linking of project sw took too long,
because my physical memory was exhausted and the system was continously
swapping. I'll report back when my W2k with 512MB finishes the build.
Comment 79 quetschke 2004-04-15 16:21:37 UTC
Hmmm, my build on Win2k with 512MB also failed with the error below. Stdout
and stderr are a bit mixed up, but ld comlains:
 "ld.exe: out of memory allocating 44 bytes"

I'll update to the 2.15.90 binutils and try again.
vq->tono: What do you use as your build system?

Info: resolving _sRTF_MARGBSXN by linking to __imp__sRTF_MARGBSXN (auto-import)
Info: resolving _sRTF_HE
d:\MinGW\bin\..\lib\gcc-lib\mingw32\3.3.1\..\..\..\..\mingw32\bin\ld.exe: out of
memory allocating 44 bytes
ADER by linking to __imp__sRTF_HEADER (auto-import)
Info: resolving _sRTF_FOOTER by linking to __imp__sRTF_FOOTER (auto-import)
Info: resolving _sRTF_FLYPRINT by linking to __imp__sRTF_FLYPRINT (auto-import)
Info: resolving _sRTF_FLYOPAQUE by linking to __imp__sRTF_FLYOPAQUE (auto-import)
Info: resolving _sRTF_FLYPRTCTD by linking to __imp__sRTF_FLYPRTCTD (auto-import)
Info: resolving _sRTF_NOWRAP by linking to __imp__sRTF_NOWRAP (auto-import)
Info: resolving _sRTF_FLYMAINCNT by linking to __imp__sRTF_FLYMAINCNT (auto-import)
Info: resolving _sRTF_FLYVERT by linking to __imp__sRTF_FLYVERT (auto-import)
Info: resolving _sRTF_PVPARA by linking to __imp__sRTF_PVPARA (auto-import)
Info: resolving _sRTF_POSYT by linking to __imp__sRTF_POSYT (auto-import)
Info: resolving _sRTF_POSY by linking to __imp__sRTF_POSY (auto-import)
Info: resolving _sRTF_POSYC by linking to __imp__sRTF_POSYC (auto-import)
Info: resolving _sRTF_POSYB by linking to __imp__sRTF_POSYB (auto-import)
Info: resolving _sRTF_PVMRG by linking to __imp__sRTF_PVMRG (auto-import)
Info: resolving _sRTF_PVPG by linking to __imp__sRTF_PVPG (auto-import)
Info: resolving _sRTF_FLYHORZ by linking to __imp__sRTF_FLYHORZ (auto-import)
Info: resolving _sRTF_PHCOL by linking to __imp__sRTF_PHCOL (auto-import)
Info: resolving _sRTF_POSXI by linking to __imp__sRTF_POSXI (auto-import)
Info: resolving _sRTF_POSXL by linking to __imp__sRTF_POSXL (auto-import)
dmake:  Error code 1, while making '../wntgcci.pro/bin/sw645gi.dll'
echo: No match.

ERROR: Error 65280 occurred while making /cygdrive/e/w1/cws_srx645_mingw/sw/util
dmake:  Error code 1, while making 'build_all'
Comment 80 tono 2004-04-15 22:06:33 UTC
tono->vq: My system is WinXpPro SP1 with 512MB RAM.
Comment 81 khirano 2004-04-15 23:59:16 UTC
hi tono and vq,

Can you show us results by performing:?
ls -la ${ORIGINAL_SRC_ROOT}/solver/645/wntgcci.pro/bin
ls -la ${ORIGINAL_SRC_ROOT}/solver/645/wntgcci.pro/lib
Comment 82 quetschke 2004-04-16 04:44:51 UTC
Created attachment 14538 [details]
ls -la solver/645/wntgcci.pro/bin
Comment 83 quetschke 2004-04-16 04:45:51 UTC
Created attachment 14539 [details]
ls -la solver/645/wntgcci.pro/lib
Comment 84 quetschke 2004-04-16 04:48:14 UTC
My build finally finished, my virtual memory was too small.
Comment 85 khirano 2004-04-16 06:12:50 UTC
Hi VQ,
From your 
ls -la solver/645/wntgcci.pro/bin and
ls -la solver/645/wntgcci.pro/lib, 
I learned that you created files in April,(Calc told me ;)
606,035,710 bytes (578MB) under bin
181,059,847 bytes (173MB) under lib.
If you strip them, how much will you get?
Wow!Wee!Anyway, it's huge.  Why?
My Windows98SE box has got only 256MB Mem.
I have to go get another 256MB Mem then.
;)
This is a BIG requirement though.

 
Comment 86 khirano 2004-04-16 08:19:29 UTC
Hi vq and tono,

How much disk space would MinGW build eat up?
All wntgcci.pro (including installation sets) and solver.
Can you estimate?

And can you tell me your build order or the order of projects (modules) to be
built with MinGW+tcsh?
Comment 87 quetschke 2004-04-16 13:39:20 UTC
> And can you tell me your build order or the order of projects (modules) to
> be built with MinGW+tcsh?
Just startt dmake in your OOo_source_dir, or if you really want to now, cd into
instsetoo and type:

build --all --show

This will show you all that will be build, and the build order.
Comment 88 quetschke 2004-04-18 07:01:05 UTC
After a final complete build I committed the following patches to
cws_srx645_mingw. This cws should now be buildable with MinGW without
extra patches to the OOo source.

ldump_hashtbl_cxx_mingw.patch (2004/04/02)
makefiles_mingw.patch (2004/04/10) (Without odk and readlicense_oo.)
solenv_mingw.patch (2004/04/10)
others_mingw.patch (2004/04/10) (Without config_office, readlicense_oo
                                 and testtools.)

MW_config_office_neu2.diff (issue 27582)
MW_sal_prj.diff
MW_odk_neu.diff
javaunohelper_source.diff

The patches above base on Takashi Ono's work, but the SRX645 moved on a bit.
Comment 89 quetschke 2004-04-18 07:02:07 UTC
Created attachment 14586 [details]
Patch for sal
Comment 90 quetschke 2004-04-18 07:02:54 UTC
Created attachment 14587 [details]
Patch for odk
Comment 91 quetschke 2004-04-18 07:03:37 UTC
Created attachment 14588 [details]
Patch for javaunohelper
Comment 92 khirano 2004-04-19 09:00:18 UTC
VQ!, Thanks for the cws_srx645_mingw tree patched.
I downloaded the tree and started my build.
soltoos was built but got an Error below.
Can this be ignored?

=============
Building project soltools
=============
/home/hirano/oo_1.1.1_src/soltools/winunistd
-------------
/home/hirano/oo_1.1.1_src/soltools/mkdepend
-------------
/home/hirano/oo_1.1.1_src/soltools/javadep
-------------
/home/hirano/oo_1.1.1_src/soltools/cpp
-------------
/home/hirano/oo_1.1.1_src/soltools/support
-------------
/home/hirano/oo_1.1.1_src/soltools/ldump
-------------
/home/hirano/oo_1.1.1_src/soltools/giparser
-------------
deliver -- version: 1.50.8.2
COPY: ../wntgcci.pro/bin/cpp ->
/home/hirano/oo_1.1.1_src/solver/645/wntgcci.pro/bin/cpp.lcc
deliver: /home/hirano/oo_1.1.1_src/soltools/prj/d.lst: ERROR: can't copy
../wntgcci.pro/bin/cpp: No such file or directory
Statistics:
Files copied: 0
Files unchanged/not matching: 36
Comment 93 quetschke 2004-04-19 20:37:23 UTC
vq->khirano:
> COPY: ../wntgcci.pro/bin/cpp ->
> /home/hirano/oo_1.1.1_src/solver/645/wntgcci.pro/bin/cpp.lcc
> deliver: /home/hirano/oo_1.1.1_src/soltools/prj/d.lst: ERROR: can't copy
> ../wntgcci.pro/bin/cpp: No such file or directory

This is normal, deliver doesn't know if the program need .exe or not,
so it tries to copy both. One of the atempts must fail.

How far is your build?

I set up a webpage with a few build instructions, see:
<http://tools.openoffice.org/dev_docs/build_windows_mingw.html>

Changes and corrections are welcome!
Comment 94 khirano 2004-04-20 06:41:16 UTC
I have only built helpcontent, xml2cmp, python, external, soltools, stlport,
freetype, cosv, np_sdk, zlib, jpeg, boost, readlicense_oo, bitstream_vera_fonts,
virgule.

I am not sure I've got the right libmsvcrt.a.

I am still staying at sal.

Making: ../../../wntgcci.pro/bin/uwinapi.dll
guw.pl /cygdrive/c/MinGW/bin/gcc -c
-o../../../wntgcci.pro/slo/uwinapi_version.obj -DWNT  -I../../../wntgcci.pro/inc
/home/hirano/oo_1.1.1_src/solenv/src/version.c
Command: /cygdrive/c/MinGW/bin/gcc
guw.pl rc -DWIN32 -I -I.  -I. -I../inc -I../../../inc -I../../../WIN/inc
-I../../../wntgcci.pro/inc -I.
-I/home/hirano/oo_1.1.1_src/solver/645/wntgcci.pro/inc/stl
-I/home/hirano/oo_1.1.1_src/solver/645/wntgcci.pro/inc/external
-I/home/hirano/oo_1.1.1_src/solver/645/wntgcci.pro/inc
-I/home/hirano/oo_1.1.1_src/solenv/wntgcci/inc
-I/home/hirano/oo_1.1.1_src/solenv/inc -I/home/hirano/oo_1.1.1_src/res
-I/home/hirano/oo_1.1.1_src/solver/645/wntgcci.pro/inc/stl
-I/cygdrive/c/jdk/include/win32 -I/cygdrive/c/jdk/include
-I/cygdrive/c/MinGW/include
-I/cygdrive/c/MinGW/lib/gcc-lib/mingw32/3.3.1/include
-I/cygdrive/c/MinGW/include/c++/3.3.1
-I/cygdrive/c/MinGW/include/c++/3.3.1/mingw32 -I'/cygdrive/c/PSDK/include'    
-I. -I../../../res -I.  ../../../wntgcci.pro/misc/uwinapi_def.rc
Command: rc
fatal error RC1109: 
dmake:  Error code 1, while making '../../../wntgcci.pro/bin/uwinapi.dll'
echo: No match.

ERROR: Error 65280 occurred while making
/home/hirano/oo_1.1.1_src/sal/systools/win32/uwinapi
[hirano@aptiva ~/oo_1.1.1_src/sal]$
Comment 95 quetschke 2004-04-20 13:39:19 UTC
> I am not sure I've got the right libmsvcrt.a.
You won't find a problem until linking the big projects: sw,sc,(?).

> Command: rc
> fatal error RC1109: 
Do you google?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/rc1109.asp

Check why.
Comment 96 khirano 2004-04-20 15:02:32 UTC
Thanks VQ,

It says:
Resource Compiler Fatal Error RC1109
error creating resource-name
Could not create specified .RES file. Make sure it is not being created on a
read-only drive. Use the /V option to find out whether the file is being created.

Can this be worked around?  Or is this THE END of my build on Windows98SE?
Comment 97 quetschke 2004-04-20 16:10:26 UTC
vq->khirano: I already read that error description, I meant you should
check why rc cannot create that file. ;-)

No idea why this fails for you, sorry.
Comment 98 khirano 2004-04-22 16:24:11 UTC
khirano->vq:

> ../../../wntgcci.pro/misc/uwinapi_def.rc
> Command: rc
> fatal error RC1109:

This means that rc can't compile uwinapi_def.rc because no resources found in
the RC file, and that RES file and OBJ file can not be made.

Can you show me your uwiapi_def.rc?

My uwiapi_def.rc contains only four lines.
#define VERVARIANT 8769
#define ORG_NAME uwinapi.dll
#define INTERNAL_NAME uwinapi
#include "shlinfo.rc"


 
Comment 99 quetschke 2004-04-23 02:34:10 UTC
> This means that rc can't compile uwinapi_def.rc because no resources found in
> the RC file, and that RES file and OBJ file can not be made.
? I'm not sure, but I doubt that is true.

> Can you show me your uwiapi_def.rc?
> 
> My uwiapi_def.rc contains only four lines.
> #define VERVARIANT 8769
> #define ORG_NAME uwinapi.dll
> #define INTERNAL_NAME uwinapi
> #include "shlinfo.rc"

#define VERVARIANT 8769
#define ORG_NAME uwinapi.dll
#define INTERNAL_NAME uwinapi
#include "shlinfo.rc"

The same. Do you have a different rc.exe in your path?
Comment 100 khirano 2004-04-24 03:15:21 UTC
I have three rc.exe.

1)$ ls /cygdrive/c/98DDK/bin/win98/bin16/Rc.exe 
/cygdrive/c/98DDK/bin/win98/bin16/Rc.exe
2)$ ls /cygdrive/c/98DDK/bin/win98/rc.exe
/cygdrive/c/98DDK/bin/win98/rc.exe
3)$ ls /cygdrive/c/PSDK/Bin/RC.Exe 
/cygdrive/c/PSDK/Bin/RC.Exe

2) and 3) are in my path.

/cygdrive/c/98DDK/bin/win98/rc.exe is used to compile uwiapi_def.rc.

When I use /cygdrive/c/PSDK/Bin/RC.Exe manually, I was told "upgrade your
Windows system."

Comment 101 tono 2004-04-25 01:07:04 UTC
tono -> khirano

I have confirmed that 98DDK/bin/win98/rc.exe works on WinXPpro.

I will check if it works on Win98.

Best Regards,

Takashi Ono
Comment 102 tono 2004-04-29 14:38:33 UTC
tono -> khirano

The rc.exe included in Win98DDK (Version 5.00.1803.1)seems to work well on my 
PC. It never complains with RC1109.

Usually the message "error creating [resource-name]" follows RC1109. What does 
it show at your site?

Takashi Ono
Comment 103 khirano 2004-04-29 14:58:57 UTC
oo_1.1.1_src/sal]$ /cygdrive/c/98DDK/bin/win98/rc.exe
wntgcci.pro/misc/uwinapi_def.rc
fatal error RC1109: 
oo_1.1.1_src/sal]$ 

Unfortunately no message after RC1109.

Comment 104 quetschke 2004-05-17 18:43:02 UTC
*** Issue 13889 has been marked as a duplicate of this issue. ***
Comment 105 khirano 2004-07-16 06:34:44 UTC
Hi Everyone,
Long time no see. ;-)

Shall we make a mingw-porting effort for 680 codeline, OpenOffice.org 2.0?
What do you think?
A new issue should be opened for the mingw-porting for 680 codeline?
Any idea?
Comment 106 quetschke 2004-07-16 14:02:53 UTC
Hi khirano,

I'm for it, but I'm waiting for a review of the sal patch in issue 29615.

Maybe you could bother Hennes a bit.
Comment 107 tono 2004-09-12 08:56:54 UTC
Hi, fellas,

I have found out some bugs in my work.

1) Thunking code to unicows.dll in uwinapi was completely not working and 
therefore the code did not work on Win98.

2) Optimization hint to the compiler should not be pentiumpro. I myself am 
still using K6-III machine. It should be pentium.

3) Defining WINVER symbol should be located in CFLAGS make variable, instead 
of in CFLAGSMT, etc. It is overridden in some project and it will not work if 
the definition is in other make variable. It caused no break in building 
because of some errors in MinGW header modification but caused trouble at 
runtime in Win98.

Therefore, I have made some changes in winuser.h MinGW header file, 
solenv/inc/wnt.mk and some files in sal/systools/win32/uwinapi.

I will attach new patch files.
Comment 108 tono 2004-09-12 08:58:47 UTC
Created attachment 17661 [details]
Patches for MINGW headers (updated September 12,2004)
Comment 109 tono 2004-09-12 09:01:02 UTC
Created attachment 17662 [details]
Patches for solenv (updated September 12,2004)
Comment 110 tono 2004-09-12 09:02:07 UTC
Created attachment 17663 [details]
Patches for project source files, delivery lists, map files etc. (Updated Spetember 12, 2004
Comment 111 quetschke 2004-09-14 00:28:26 UTC
Tono, great you continue working on this!

But your new patches don't apply to the cws_srx645_mingw branch. Would it be
possible for you to submit the patches against that cvs branch.

This would make the integration much, much easier.

Thanks!
Comment 112 khirano 2004-09-14 01:20:31 UTC
Hi Tono and vq,

I tried an installation set (Japanese) built with MinGW+tcsh by Tono.
Only oleautobridge.uno.dll and so_activex.dll are missing but it works great!
The size of the zipped installation set is 78M, right?, Tono?
This is a great work!

Thanks!
Comment 113 tono 2004-09-14 13:00:38 UTC
tono->vq

How can I place modification for MinGW headers?

Others are as follows.

cvs -q diff solenv\inc\wnt.mk sal\systools\win32\uwinapi\uwinapi_mingw.dxp 
sal\systools\win32\uwinapi\ResolveThunk.cpp sal\systools\win32
\uwinapi\DllMain.cpp (in directory C:\TEMP\)
Index: solenv/inc/wnt.mk
===================================================================
RCS file: /cvs/tools/solenv/inc/wnt.mk,v
retrieving revision 1.52.26.2.22.4
diff -r1.52.26.2.22.4 wnt.mk
513,515c513,515
< CFLAGS+=-nostdinc
< CFLAGSCC=-pipe -march=pentiumpro
< CFLAGSCXX=-pipe -march=pentiumpro -fno-for-scope -fpermissive
---
> CFLAGS+=-nostdinc -DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400
> CFLAGSCC=-pipe -march=pentium
> CFLAGSCXX=-pipe -march=pentium -fno-for-scope -fpermissive
519,524c519,524
< CFLAGSOBJGUIST=-DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_DLL
< CFLAGSOBJCUIST=-DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_DLL
< CFLAGSOBJGUIMT=-DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_MT -D_DLL
< CFLAGSOBJCUIMT=-DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_MT -D_DLL
< CFLAGSSLOGUIMT=-DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_MT -D_DLL
< CFLAGSSLOCUIMT=-DWIN32 -DWINVER=0x0500 -D_WIN32_IE=0x400 -D_MT -D_DLL
---
> CFLAGSOBJGUIST=-D_DLL
> CFLAGSOBJCUIST=-D_DLL
> CFLAGSOBJGUIMT=-D_MT -D_DLL
> CFLAGSOBJCUIMT=-D_MT -D_DLL
> CFLAGSSLOGUIMT=-D_MT -D_DLL
> CFLAGSSLOCUIMT=-D_MT -D_DLL
Index: sal/systools/win32/uwinapi/uwinapi_mingw.dxp
===================================================================
RCS file: /cvs/porting/sal/systools/win32/uwinapi/Attic/uwinapi_mingw.dxp,v
retrieving revision 1.1.2.2
diff -r1.1.2.2 uwinapi_mingw.dxp
63,79c63,79
< DllGetVersion
< CommandLineToArgvW
< CopyFileExA
< CopyFileExW
< CreateToolhelp32Snapshot
< DrawStateW
< EnumProcesses
< GetDiskFreeSpaceExA
< GetDiskFreeSpaceExW
< GetLogicalDriveStringsW
< GetLongPathNameA
< GetLongPathNameW
< GetModuleFileNameExA
< GetModuleFileNameExW
< GetProcessId
< GetUserDomainA
< GetUserDomainW
---
> DllGetVersion@4
> CommandLineToArgvW@8
> CopyFileExA@24
> CopyFileExW@24
> CreateToolhelp32Snapshot@8
> DrawStateW@40
> EnumProcesses@12
> GetDiskFreeSpaceExA@16
> GetDiskFreeSpaceExW@16
> GetLogicalDriveStringsW@8
> GetLongPathNameA@12
> GetLongPathNameW@12
> GetModuleFileNameExA@16
> GetModuleFileNameExW@16
> GetProcessId@4
> GetUserDomainA@8
> GetUserDomainW@8
84,107c84,107
< MoveFileExA
< MoveFileExW
< Process32First
< Process32FirstW
< Process32Next
< Process32NextW
< FindFirstVolumeA
< FindFirstVolumeW
< FindNextVolumeA
< FindNextVolumeW
< FindVolumeClose
< FindFirstVolumeMountPointA
< FindFirstVolumeMountPointW
< FindNextVolumeMountPointA
< FindNextVolumeMountPointW
< FindVolumeMountPointClose
< GetVolumeNameForVolumeMountPointA
< GetVolumeNameForVolumeMountPointW
< DeleteVolumeMountPointA
< DeleteVolumeMountPointW
< GetVolumePathNameA
< GetVolumePathNameW
< SetVolumeMountPointA
< SetVolumeMountPointW
---
> MoveFileExA@12
> MoveFileExW@12
> Process32First@8
> Process32FirstW@8
> Process32Next@8
> Process32NextW@8
> FindFirstVolumeA@8
> FindFirstVolumeW@8
> FindNextVolumeA@12
> FindNextVolumeW@12
> FindVolumeClose@4
> FindFirstVolumeMountPointA@12
> FindFirstVolumeMountPointW@12
> FindNextVolumeMountPointA@12
> FindNextVolumeMountPointW@12
> FindVolumeMountPointClose@4
> GetVolumeNameForVolumeMountPointA@12
> GetVolumeNameForVolumeMountPointW@12
> DeleteVolumeMountPointA@4
> DeleteVolumeMountPointW@4
> GetVolumePathNameA@12
> GetVolumePathNameW@12
> SetVolumeMountPointA@8
> SetVolumeMountPointW@8
Index: sal/systools/win32/uwinapi/ResolveThunk.cpp
===================================================================
RCS file: /cvs/porting/sal/systools/win32/uwinapi/ResolveThunk.cpp,v
retrieving revision 1.3.248.1
diff -r1.3.248.1 ResolveThunk.cpp
99c99,101
< extern "C" extern FARPROC _PfnLoadUnicows;
---
> extern "C" {
> extern HMODULE hModuleUnicowsDLL;
> }
103,106c105
< 	FARPROC	lpfnResult = GetProcAddress( LoadLibraryA( lpLibFileName ), 
lpFuncName );
< 
< 	if ( !lpfnResult )
< 		lpfnResult = GetProcAddress( _PfnLoadUnicows(), lpFuncName );
---
> 	FARPROC	lpfnResult = (((LONG)GetVersion()&0x800000ff) == 0x80000004) ? 
GetProcAddress( hModuleUnicowsDLL, lpFuncName ) : GetProcAddress( LoadLibraryA
( lpLibFileName ), lpFuncName );
Index: sal/systools/win32/uwinapi/DllMain.cpp
===================================================================
RCS file: /cvs/porting/sal/systools/win32/uwinapi/DllMain.cpp,v
retrieving revision 1.3
diff -r1.3 DllMain.cpp
153c153,246
< extern "C" FARPROC _PfnLoadUnicows = (FARPROC)LoadUnicowsLibrary;
---
> extern "C" {
> FARPROC _PfnLoadUnicows = (FARPROC)LoadUnicowsLibrary;
> }
> 
> #ifdef __MINGW32__
> 
> extern "C" {
> 
> typedef void (*func_ptr) (void);
> extern func_ptr __CTOR_LIST__[];
> extern func_ptr __DTOR_LIST__[];
> 
> static void do_startup(void);
> static void do_cleanup(void);
> 
> HMODULE hModuleUnicowsDLL;
> 
> void
> __do_global_dtors (void)
> {
>   static func_ptr *p = __DTOR_LIST__ + 1;
> 
>   /*
>    * Call each destructor in the destructor list until a null pointer
>    * is encountered.
>    */
>   while (*p)
>     {
>       (*(p)) ();
>       p++;
>     }
> }
> 
> void
> __do_global_ctors (void)
> {
>   unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
>   unsigned i;
> 
>   /*
>    * If the first entry in the constructor list is -1 then the list
>    * is terminated with a null entry. Otherwise the first entry was
>    * the number of pointers in the list.
>    */
>   if (nptrs == static_cast<unsigned long>(-1))
>     {
>       for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
> 	;
>     }
> 
>   /* 
>    * Go through the list backwards calling constructors.
>    */
>   for (i = nptrs; i >= 1; i--)
>     {
>       __CTOR_LIST__[i] ();
>     }
> 
>   /*
>    * Register the destructors for processing on exit.
>    */
>   atexit (__do_global_dtors);
> }
> 
> static int initialized = 0;
> 
> void
> __main (void)
> {
>   if (!initialized)
>     {
>       initialized = 1;
>       do_startup();
>       __do_global_ctors ();
>     }
> }
> 
> static void do_startup( void )
> {
> 	if (((LONG)GetVersion()&0x800000ff) == 0x80000004)
>         {
> 		hModuleUnicowsDLL = LoadUnicowsLibrary();
> 		if (hModuleUnicowsDLL)
> 			atexit(do_cleanup);
> 	}
> }
> 
> void do_cleanup( void )
> {
> 	FreeLibrary(hModuleUnicowsDLL);
> }
> }
> 
> #endif
Comment 114 quetschke 2004-09-14 13:22:48 UTC
Thanks, I will commit the patches later today.

> How can I place modification for MinGW headers?

The patching of the MinGW headers is done by external/mingwheaders, but you
don't need to bother to create a patch for the patchfile there, I will
just replace the old patchfile with the new header patchfile.

Uhh, it looks like I have to resync the cws_srx645_mingw branch to the latest
srx645 milestone ... I hope I find some time soon.
Comment 115 foskey 2004-12-22 21:07:55 UTC
I think this is completed.  PLease add a status.
Comment 116 vg 2004-12-23 13:57:46 UTC
see last comment
Comment 117 quetschke 2004-12-23 14:21:11 UTC
>> ------- Additional comments from waratah
>> I think this is completed.  PLease add a status.
>------- Additional comments from vg
>see last comment
Indeed, that was a question. Three issues this issue depends on are not closed.
Why did you close it?
Comment 118 vg 2005-01-10 16:04:04 UTC
Retargeting
Comment 119 tono 2005-01-16 03:02:40 UTC
I have stared to work with 680 codeline.

Currently no significant changes. So many patches are required especially for 
windows only sources. Many are not compatible with gcc or standard c++.

As the number of projects depends on mozilla increased, I am trying to build 
mozzilla as well.

Still OLE and ATL library is the largest issue.

I also tried newer binutils package (2.15.91) but dlltool and windres still 
have the same problems.

For sal issue, I will comment on #29615.



Takashi Ono (tono)
Comment 120 vg 2007-09-14 11:58:46 UTC
the issue is out-of-date, there are later issues...
Comment 121 vg 2007-09-14 11:59:42 UTC
close issue