libpng.a: error adding symbols: Malformed archive

263 views
Skip to first unread message

José M. C. Quintas

unread,
Mar 13, 2023, 6:52:59 AM3/13/23
to harbou...@googlegroups.com
libpng.a: error adding symbols: Malformed archive

I receive this error on compilation, only on one project.

Check all compilations and harbour allways add this file on all
compilation.

This project do not use anything that do not exists on another projects.

This project is from Clipper times, no extra function, no extra library.

Any idea ?


José M. C. Quintas

Maurizio la Cecilia

unread,
Mar 13, 2023, 7:18:56 AM3/13/23
to harbou...@googlegroups.com
Hi José,
it's an old issue, still without a definitive patch.

Please read here:
https://groups.google.com/g/harbour-devel/c/CzEiQI3cygQ/m/osLupsB5BwAJ

That's the link to the thread:

https://groups.google.com/g/harbour-devel/c/CzEiQI3cygQ/m/I_GyE-X_AwAJ

Please, report if the suggestions I made will solve your issue.
Best regards.
--
Maurizio

José M. C. Quintas

unread,
Mar 13, 2023, 8:31:33 AM3/13/23
to harbou...@googlegroups.com
Nothing to change order, because it is the same on all aplications.

This is a smaller application, basically only clipper 5.2 functions.

Without another option, copy and old version of libpng.a.

Found an information about this error begans on harbour 2018-12-31

Checking repository, last modification was on 2017-09-13

extension was changed from png.dif to png.diff

I will make a test using this:

copy png.diff png.dif

José M. C. Quintas

jmcqu...@gmail.com

unread,
Mar 13, 2023, 8:53:06 AM3/13/23
to Harbour Users

Same error.
Same solution: copy and older version of libpng.a


José M. C. Quintas

jmcqu...@gmail.com

unread,
Apr 14, 2023, 2:27:14 PM4/14/23
to Harbour Users
A current compilation, check if this helps anything, because I do not see nothing

this, ok
hbmk2 test -lgtwvg -lhbwin -mt -gui

this, error of png invalid
hbmk2 test -lgtwvg -lhbwin -mt -gui      gtwvg.hbc

------on gtwvg.hbc
description=GTWVG (an extension of GTWVT, win-only)
skip={!win}
incpaths=.
gt=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
libs=hbwin.hbc
gui=yes
mt=yes

-----test project.hbp
test.prg
-Ld:\github\hmge
hmge.hbc
hbzebra.hbc
hbhpdf.hbc
-w0

jmcqu...@gmail.com

unread,
Apr 14, 2023, 2:39:52 PM4/14/23
to Harbour Users
NEW TEST:

----------hbwin.hbc
description=Windows specific functions (win-only)
skip={!allwin}
incpaths=.
headers=${hb_name}.ch
libs=${_HB_DYNPREF}${hb_name}${_HB_DYNSUFF}
libs=png
{wce}libs=sms CellCore

error when adding hbwin.hbc, but..... hbwin indicates lib PNG

note: gtwvg.hbc indicates hbwin.hbc

José M. C. Quintas

jmcqu...@gmail.com

unread,
Apr 14, 2023, 3:03:03 PM4/14/23
to Harbour Users
I use GTWVG/HBWIN ALL TIME and no error.
on THIS COMPILATION error, but no error if remove it from hbwin.hbc
And no message about function lost, removing lib png

Single questions:

Why hbwin need it ?

Where it is used on harbour ? Can be removed ?

José M. C. Quintas

jmcqu...@gmail.com

unread,
Apr 14, 2023, 3:30:30 PM4/14/23
to Harbour Users
I answer last message: Can't be removed
It is used on harupdf

The difference on THIS compilation is the use of HMG Extended
I will check library order on it's hbc

José M. C. Quintas


jmcqu...@gmail.com

unread,
Apr 14, 2023, 6:07:49 PM4/14/23
to Harbour Users
Another single test:

hbmk2 test.hbp gtwvg.hbc -> ok
hbmk2 gtwvg.hbc test.hbp -> error

because gtwvg.hbc calls hbwin.hbc and hbwin calls png library.
when first on command, png enter before anothers.
if they do not use png, do not need it on hbc, and no problem if first or last
png is part of hbhpdf.hbc because harupdf need it, then include on hbhpdf.hbc.
if it is windows only:   {win}-lpng

This will reduce too much situations where the error occurs.



José M. C. Quintas

jmcqu...@gmail.com

unread,
Apr 14, 2023, 6:21:25 PM4/14/23
to Harbour Users

my mistake: on hbc is lib=png

José M. C. Quintas

jmcqu...@gmail.com

unread,
Apr 14, 2023, 6:22:36 PM4/14/23
to Harbour Users
And another mistake:   libs=png

José M. C. Quintas

Reply all
Reply to author
Forward
0 new messages