Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error adding symbols: Malformed archive #311

Open
JoseQuintas opened this issue Apr 14, 2023 · 5 comments
Open

error adding symbols: Malformed archive #311

JoseQuintas opened this issue Apr 14, 2023 · 5 comments

Comments

@JoseQuintas
Copy link

problem occurs when png is before anothers libraries
but libs=png is on hbwin.hbc, and hbwin do not use it
correct is include it on hbhpdf.hbc, because harupdf need png.
if it is for windows only, this can be indicated using {win}libs=png
This will reduce problems.
On my recent test:
hbmk2 test gtwvg.hbc -> ok
hbmk2 gtwvg.hbc test -> error
because gtwvg.hbc have hbwin.hbc, and hbwin.hbc have libs=png

@JoseQuintas
Copy link
Author

JoseQuintas commented Apr 16, 2023

I do not know about C source code.
Is it possible that PNG and harupdf are directly dependant ?
If yes, may be it is related to how they are on link order.
And this another reason to do not include libs=png on hbwin.hbc, because nested hbc can include hbwin.hbc and change order, this is not visible on HBP.

Generating C source output to 'C:\Users\jmcqu\AppData\Local\Temp\hbmk_tcnvbz.dir\harupdf.c'... Done.
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x33): undefined reference to png_get_io_ptr' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x147): undefined reference to png_get_error_ptr'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x19c): undefined reference to png_get_PLTE' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x325): undefined reference to png_create_read_struct'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x339): undefined reference to png_create_info_struct' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x35a): undefined reference to png_set_sig_bytes'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x373): undefined reference to png_set_read_fn' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x387): undefined reference to png_read_info'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x3aa): undefined reference to png_destroy_read_struct' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x442): undefined reference to png_get_IHDR'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x461): undefined reference to png_read_update_info' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x566): undefined reference to png_destroy_read_struct'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x5ce): undefined reference to png_get_valid' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x6f2): undefined reference to png_get_image_height'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x706): undefined reference to png_get_image_width' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x71a): undefined reference to png_get_color_type'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x75e): undefined reference to png_get_rowbytes' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x813): undefined reference to png_destroy_read_struct'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x828): undefined reference to png_set_strip_16' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x86b): undefined reference to png_destroy_read_struct'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x884): undefined reference to png_get_interlace_type' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x8a4): undefined reference to png_get_rowbytes'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x8b4): undefined reference to png_get_image_height' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x98f): undefined reference to png_get_tRNS'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xab8): undefined reference to png_get_image_height' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xad2): undefined reference to png_get_image_width'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xb0a): undefined reference to png_get_rowbytes' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xb98): undefined reference to png_get_rowbytes'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xbaa): undefined reference to png_get_image_height' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xc1d): undefined reference to png_read_rows'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xc52): undefined reference to png_read_image' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xcb6): undefined reference to png_read_image'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xd74): undefined reference to png_destroy_read_struct' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xecf): undefined reference to png_read_image'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0xf8f): undefined reference to png_read_image' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x1044): undefined reference to png_read_image'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x1110): undefined reference to png_read_image' d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x1276): undefined reference to png_sig_cmp'
d:/harbour/lib/win/mingw\liblibhpdf.a(hpdfimap.o):(.text+0x1382): undefined reference to `png_sig_cmp'
collect2.exe: error: ld returned 1 exit status

@JoseQuintas
Copy link
Author

I copy src/3rd/png from 3.4 to 3.2 and all ok.
I do not know about C, I do not know if change is valid, but it works.

@tuffnatty
Copy link
Member

@JoseQuintas src/3rd/png has been updated in this repo, please report if the issue is still valid.

@JoseQuintas
Copy link
Author

It is already made.

@JoseQuintas
Copy link
Author

JoseQuintas commented Dec 11, 2023

I was wrong. There are changes but problem is not solved.
Receive the error message just now. Solve on same way, copying from 3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants