[sane-devel] error building using --enable-static
chris at cnpbagwell.com
Wed Aug 8 02:44:10 UTC 2012
I fixed the kvs backend symbol issues and committed them.
Also, I believe I have a fix for jpeg symbols. I think its just a
linking ordering issue. At least I got it working by hand editing the
frontend/Makefile and moving the libraries with missing symbols to
later in line of saned_LDADD and scanimage_LDADD.
I do not have the older versions of autofoo packages installed and
I'll reluctant to submit large configure and Makefile.in file updates
at this stage.
If someone has older autofoo installed and can check in just
frontend/Makefile.am and frontend/Makefile.in change, here is
suggested patch (I notice that liblib.la is in two different orders.
May need to move one of those to later as well):
@@ -17,11 +17,11 @@ endif
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include
scanimage_SOURCES = scanimage.c stiff.c stiff.h
-scanimage_LDADD = ../lib/liblib.la ../lib/libfelib.la ../backend/libsane.la
+scanimage_LDADD = ../backend/libsane.la ../lib/liblib.la ../lib/libfelib.la
saned_SOURCES = saned.c
-saned_LDADD = ../sanei/libsanei.la ../lib/liblib.la ../lib/libfelib.la \
- ../backend/libsane.la @SYSLOG_LIBS@
+saned_LDADD = ../backend/libsane.la ../sanei/libsanei.la ../lib/liblib.la \
+ ../lib/libfelib.la @SYSLOG_LIBS@
test_SOURCES = test.c
test_LDADD = ../lib/liblib.la ../lib/libfelib.la ../backend/libsane.la
On Sat, Aug 4, 2012 at 2:13 AM, stef <stef.dev at free.fr> wrote:
> while debugging saned/genesys backend I noted that a static build :
> ./configure 'CFLAGS=-ggdb' '--prefix=/usr' '--sysconfdir=/etc'
> '--enable-pnm-backend' '--enable-parport-directio' '--enable-locking'
> --enable-static --disable-shared
> fails with:
> Warning: alignment 16 of symbol `scan' in
> ../backend/.libs/libsane.a(libkvs20xx_la-kvs20xx_cmd.o) is smaller than 32
> in ../backend/.libs/libsane.a(libhp3900_la-hp3900.o)
> Warning: size of symbol `scan' changed from 72 in
> ../backend/.libs/libsane.a(libhp3900_la-hp3900.o) to 86 in
> Warning: type of symbol `scan' changed from 1 to 2 in
> ../backend/.libs/libsane.a(libgphoto2_i_la-gphoto2.o): In function
> /stefdev/git/sane-backends/backend/gphoto2.c:1982: undefined reference to
> ../backend/.libs/libsane.a(libdc210_la-dc210.o): In function
> /stefdev/git/sane-backends/backend/dc210.c:1264: undefined reference to
> ../backend/.libs/libsane.a(libdc240_la-dc240.o): In function
> /stefdev/git/sane-backends/backend/dc240.c:1477: undefined reference to
> collect2: error: ld returned 1 exit status
> make: *** [scanimage] Erreur 1
> make: *** [all-recursive] Erreur 1
> All the ksv20xx_cmd.c functions should be renamed like explained in
> backend-writing.txt , so to avoid clashes like the one on the 'scan'
> function with the hp3900 (which maybe is lacking a 'static' somewhere).
> 'make libchek' lists all the symbols that may clash, and there is quite a
> number of them.
> And it seems some library is missing at link time for scanimage.
> I currently haven't the time to dig into it. So if anyone has time ....
> sane-devel mailing list: sane-devel at lists.alioth.debian.org
> Unsubscribe: Send mail with subject "unsubscribe your_password"
> to sane-devel-request at lists.alioth.debian.org
More information about the sane-devel