lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Integrate wxPdfDocument into lmi build system


From: Greg Chicares
Subject: Re: [lmi] [PATCH] Integrate wxPdfDocument into lmi build system
Date: Fri, 07 Aug 2015 16:33:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

[It all works in the end...or quickly and easily if one eschews "shortcuts"]

On 2015-07-24 00:21, Vadim Zeitlin wrote:
[...]
>  Finally, I did my best to test these changes, notably I verified that
> running install_msw.sh still works (provided the necessary adjustments to
> the Cygwin mirror is done and my other patch allowing to use wxWidgets 3.1
> from GitHub is applied).

I tested differently: I ran 'make $coefficiency -f install_wxpdfdoc.make'
at the command line. That means I used the version of wx that lmi uses in
production, which is b6ab81584f49a1997e6d6236fcb65d1b5c58a5bd. Everything
looked okay until...

checking target system type... i686-pc-mingw32
checking for the --enable-debug option... will be automatically detected
checking for the --enable-unicode option... will be automatically detected
checking for the --enable-shared option... will be automatically detected
checking for the --with-toolkit option... will be automatically detected
checking for the --with-wxshared option... will be automatically detected
checking for the --with-wxversion option... will be automatically detected
checking for wx-config... /opt/lmi/local/bin/wx-config-portable
checking for wxWidgets version >= 2.8.0... ./configure: line 2594: test: too 
many arguments
./configure: line 2597: test: too many arguments
no (version Bad argument --host=i686-pc-mingw32 is not new enough)
configure: error:
    The requested wxWidgets build couldn't be found.


    If you still get this error, then check that 'wx-config' is
    in path, the directory where wxWidgets libraries are installed
    (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH
    or equivalent variable and wxWidgets version is 2.8.0 or above.
/lmi/src/lmi/install_wxpdfdoc.make:107: recipe for target 'wxpdfdoc' failed

Let's confirm:

/lmi/src/lmi[2]$ls -o /opt/lmi/local/bin/wx-config-portable
-rwxr-xr-x 1 earl 353 May 16 16:45 /opt/lmi/local/bin/wx-config-portable

Okay, that doesn't reflect required changes committed yesterday,
because I didn't rebuild wx. This should suffice:

/lmi/src/lmi[0]$make -f install_wx.make portable_script
/lmi/src/lmi[0]$mv wx-config-portable /opt/lmi/local/bin/wx-config-portable
/lmi/src/lmi[0]$ls -o /opt/lmi/local/bin/wx-config-portable
-rwxr-xr-x 1 earl 688 Aug  7 13:01 /opt/lmi/local/bin/wx-config-portable

Let's retry:

/lmi/src/lmi[0]$make $coefficiency -f install_wxpdfdoc.make >../log 2>&1

It still fails in the same way:

checking for wx-config... /opt/lmi/local/bin/wx-config-portable
checking for wxWidgets version >= 2.8.0... no
configure: error:
    The requested wxWidgets build couldn't be found.


    If you still get this error, then check that 'wx-config' is
    in path, the directory where wxWidgets libraries are installed
    (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH
    or equivalent variable and wxWidgets version is 2.8.0 or above.
/lmi/src/lmi/install_wxpdfdoc.make:107: recipe for target 'wxpdfdoc' failed

Is that in $PATH? Yes:

/lmi/src/lmi[0]$echo $path
/opt/lmi/local/bin /opt/lmi/local/lib /usr/local/bin /usr/bin /bin /usr/sbin 
/sbin /opt/lmi/local/bin /opt/lmi/local/lib [...]

This is certainly wx-2.8 or above. This cygwin-on-msw-xp system has
no LD_LIBRARY_PATH and has never needed one. Let's try this:

/lmi/src/lmi[0]$/opt/lmi/local/bin/wx-config-portable --libs

/lmi/src/lmi[0]$

That doesn't seem right. Examining the script, I see:

        --libs)
            echo
            this_with_arg=1
            ;;

and the other cases also echo nothing.

So perhaps what we really need is to run it in its proper directory:

/lmi/src/lmi[0]$make --file=/lmi/src/lmi/install_wx.make 
--directory=/opt/lmi/local/bin portable_script

That file looks better. Let's try again:

/lmi/src/lmi[0]$make $coefficiency -f install_wxpdfdoc.make >../log 2>&1

Windows - Out of Virtual Memory
Your system is low on virtual memory. To ensure
that Windows runs properly, increase the size of
your virtual memory paging file. For more
information, see Help.

Looking inside ../log :

  Configuration for wxpdfdoc 0.9.4 successfully completed.
[...start compiling sixteen files at once...]
  cc1plus.exe: out of memory allocating 65536 bytes

Well, maybe this thing needs more room. Try again:

/lmi/src/lmi[2]$make ggc_flags=  -f install_wxpdfdoc.make >../log 2>&1

[I didn't expect "ggc_flags= " to do anything, but the gcc 'ggc-min-expand'
and 'ggc-min-heapsize' parameters don't appear in the log, so maybe it worked.]

Now we get a lot farther--it goes smoothly up to here:

./src/pdffontvolt.cpp:55: error: `wxRegEx' does not name a type

and that must be because I haven't yet rebuilt wx with wxRegEx enabled.
So that's the next step.

I may as well update wx while I'm doing this. I've been doing:
  git clone https://github.com/wxWidgets/wxWidgets.git
  git log -1 | head -n1
  commit 0b821adf903872b6d8b56630d2191c5b9c3362e5
to get the sha1sum of the latest commit; is there an easier way to do that
now that we're grabbing '.zip' archives from GitHub? Anyway...

Now I update these hashes in 'install_wx.make':
  wx_commit_sha     := 0b821adf903872b6d8b56630d2191c5b9c3362e5
  wx_md5            := ac28a959aabe36e26ea039ed78a51b54
and rebuild wx:

/lmi/src/lmi[0]$make $coefficiency -f install_wx.make >../log 2>&1

No warnings except these two:
../src/common/docview.cpp:1530: warning: 'docNew' might be used uninitialized 
in this function
../src/common/event.cpp:1609: warning: 'loop' might be used uninitialized in 
this function
that we've already discussed in the past and decided to accept. Now
build wxPdfDoc:

/lmi/src/lmi[0]$make ggc_flags=  -f install_wxpdfdoc.make >../log 2>&1

...and now everything seems to work. And the test succeeds:

$make $coefficiency unit_tests unit_test_targets=wx_pdfdoc_test.exe
...
Running wx_pdfdoc_test:

.... 3 tests succeeded
no errors detected

And lmi builds with the new wx; and wx_test succeeds:

  SUCCESS: 21 tests successfully completed.
  NOTE: 4 tests were skipped

(I thought I had reported some 'wx_test' problem within the last few
months, one to which Kim and you were immune, and which we hoped would
become diagnosable with a wx upgrade; but now I can't find it.)

So I'll update the hashes in 'install_wx.make', and the options in
'install_msw.sh':

- make $coefficiency -f install_wxpdfdoc.make
+ make ggc_flags= -f install_wxpdfdoc.make

and advise everyone to avoid the shortcuts that led me astray above,
instead building wx, then wxPdfDoc, using the commands that'll soon
be revised in 'install_msw.sh'.

Probably I'll move 'wx_pdfdoc_test' out of $(unit_test_targets), which
otherwise don't depend on wx in any way. For now, it can just be a
standalone program that's built and run only upon explicit demand.
Soon, it may go away, because we can just create a premium-quote PDF
in the GUI-test suite and this tiny test will no longer serve any
purpose (I think).

I'd really like to know an effortless way to get the sha1sum of wx HEAD
for future maintenance.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]