On Thu, Feb 04, 2016 at 02:43:04PM -0500, Jean-Louis Martineau wrote:
> Jose,
> 
> Can you try the attached patch.
> 
> You should use the configure --with-amandates=/var/lib/amanda/amandates
> Instead of adding the following to CFLAGS:
> 
>      -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"'
> 
> The '-DAMANDATES_FILE=' is useless

Thank you, the patch worked.  Time to test the result.

> 
> Jean-Louis
>

Jose M Calhariz


> On 04/02/16 02:27 PM, Jose M Calhariz wrote:
> >On Wed, Feb 03, 2016 at 05:05:03PM -0500, Jean-Louis Martineau wrote:
> >>On 03/02/16 04:54 PM, Jose M Calhariz wrote:
> >>>On Wed, Feb 03, 2016 at 04:40:09PM -0500, Jean-Louis Martineau wrote:
> >>>>$ rm common-src/amcrc32chw.lo
> >>>>
> >>>>As a workaround, add '-msse4.2' to the 'CFLAGS =' line in
> >>>>common-src/Makefile
> >>>Does -msse4.2 means it is needed a relatively recent i386 CPU?  By
> >>>that I mean better than i686.  There is a way to disable it?  So can be
> >>>compiled for i686 CPUs that is the minimal target of Debian.
> >>We generated both sse4.2 code and non-sse4.2 code.
> >>The code detect at run time if the processor have the instruction and use a
> >>different code if it doesn't.
> >>The generated code should works on any x86.
> >I found the following:
> >
> >* cd common-src; make --- work
> >
> >* cd common-src; make CFLAGS="$CFLAGS -O2 -g -Wall
> >     -DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' -DIGNORE_TAR_ERRORS "
> >     --- does not work.
> >
> >
> >I know that some of the flags can go a way.  But
> >-DAMANDATES_FILE='\"/var/lib/amanda/amandates\"' -DIGNORE_TAR_ERRORS
> >are important for the Debian localization of amanda.  Can be moved to
> >configure?
> >
> >Just in case make --version
> >GNU Make 4.0
> >Built for i586-pc-linux-gnu
> >Copyright (C) 1988-2013 Free Software Foundation, Inc.
> >License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> >This is free software: you are free to change and redistribute it.
> >There is NO WARRANTY, to the extent permitted by law.
> >
> >
> >Jose M Calhariz
> >
> >>Jean-Louis
> >>>
> >>>>Jean-Louis
> >>>Jose M Calhariz
> >>>
> >>>>On 03/02/16 04:30 PM, Jose M Calhariz wrote:
> >>>>>When I manually compile it:
> >>>>>
> >>>>>mv -f .deps/version.Tpo .deps/version.Plo
> >>>>>/bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -Wextra 
> >>>>>-Wparentheses -Wdeclaration-after-statement -Wmissing-prototypes 
> >>>>>-Wstrict-prototypes -Wmissing-declarations -Wformat -Wformat-security 
> >>>>>-Wsign-compare -Wfloat-equal -Wold-style-definition -Wno-strict-aliasing 
> >>>>>-Wno-unknown-pragmas -Wno-deprecated-declarations -g -O2 -fPIE 
> >>>>>-fstack-protector-strong -Wformat -Werror=format-security 
> >>>>>-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -release 
> >>>>>3.3.8  -fPIE -pie -Wl,-z,relro -Wl,-z,now  -o libamanda.la -rpath 
> >>>>>/usr/lib/amanda alloc.lo am_sl.lo amfeatures.lo amflock.lo ipc-binary.lo 
> >>>>>amxml.lo clock.lo columnar.lo conffile.lo debug.lo dgram.lo event.lo 
> >>>>>file.lo fileheader.lo glib-util.lo match.lo packet.lo pipespawn.lo 
> >>>>>protocol.lo amsemaphore.lo security.lo security-util.lo simpleprng.lo 
> >>>>>sockaddr-util.lo stream.lo tapelist.lo timestamp.lo util.lo 
> >>>>>amcrc32chw.lo amflock-posix.lo amflock-flock.lo amflock-lockf.lo 
> >>>>>amflock-lnlock.lo  ssh-security.lo bsd-security.lo b!
> >>sdtcp-security.lo bsdudp-security.lo  local-security.lo version.lo 
> >>../gnulib/libgnu.la -lcrypto -L/usr/lib/i386-linux-gnu -lcurl -lm 
> >>-Wl,--export-dynamic -lgmodule-2.0 -pthread -lgobject-2.0 -lgthread-2.0 
> >>-pthread -lglib-2.0  -lnsl -lresolv
> >>>>>libtool: link: `amcrc32chw.lo' is not a valid libtool object
> >>>>>Makefile:2113: recipe for target 'libamanda.la' failed
> >>>>>make[1]: *** [libamanda.la] Error 1
> >>>>>make[1]: Leaving directory 
> >>>>>'/home/cal/source.amanda/amanda/amanda-3.3.8/common-src'
> >>>>>Makefile:2030: recipe for target 'all' failed
> >>>>>make: *** [all] Error 2
> >>>>>1 7 SSH-AGENT  Wed Feb 03 21:28:15 
> >>>>>CWD=~/source.amanda/amanda/amanda-3.3.8/common-src
> >>>>>cal@picard[3592]>
> >>>>>
> >>>>>
> >>>>>
> >>>>>On Wed, Feb 03, 2016 at 04:21:22PM -0500, Jean-Louis Martineau wrote:
> >>>>>>It correctly detect it must use the -msse4.2 flags, but why it doesn't 
> >>>>>>use
> >>>>>>it??
> >>>>>>
> >>>>>>Can you try to manually compile it with the -msse4.2 flags? The 
> >>>>>>following
> >>>>>>should do it, It is from what you posted earlier, I added the -msse4.2 
> >>>>>>flags
> >>>>>>
> >>>>>>$ cd common-src
> >>>>>>$ gcc -DHAVE_CONFIG_H -I. -I../config -I../gnulib  -D_FORTIFY_SOURCE=2 
> >>>>>>-fno-strict-aliasing -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 
> >>>>>>-I/usr/lib/i386-linux-gnu/glib-2.0/include   -Wall -Wextra 
> >>>>>>-Wparentheses -Wdeclaration-after-statement -Wmissing-prototypes 
> >>>>>>-Wstrict-prototypes -Wmissing-declarations -Wformat -Wformat-security 
> >>>>>>-Wsign-compare -Wfloat-equal -Wold-style-definition 
> >>>>>>-Wno-strict-aliasing -Wno-unknown-pragmas -Wno-deprecated-declarations 
> >>>>>>-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security 
> >>>>>>-O2 -g -Wall -msse4.2    -DAMANDATES_FILE='"/var/lib/amanda/amandates"' 
> >>>>>> -DIGNORE_TAR_ERRORS  -MT amcrc32chw.lo -MD -MP -MF 
> >>>>>>.deps/amcrc32chw.Tpo -c -o amcrc32chw.lo amcrc32chw.c
> >>>>>>$ make
> >>>>>>$ cd ..
> >>>>>>$ make
> >>>>>>
> >>>>>>
> >>>>>>Jean-Louis
> >>>>>>
> >>>>>>On 03/02/16 04:11 PM, Jose M Calhariz wrote:
> >>>>>>>On Wed, Feb 03, 2016 at 03:52:45PM -0500, Jean-Louis Martineau wrote:
> >>>>>>>>The compilation flag do not have the -msse4.2 flag as expected.
> >>>>>>>>Can you run the following command:
> >>>>>>>Yes, on my jessie machine it is:
> >>>>>>>
> >>>>>>>grep SSE42 Makefile
> >>>>>>>SSE42_CFLAGS = -msse4.2
> >>>>>>>
> >>>>>>>grep -1i sse4\.2 config.log
> >>>>>>>configure:35574: result: yes
> >>>>>>>configure:35601: checking for gcc flag -msse4.2
> >>>>>>>configure:35609: result: yes
> >>>>>>>  --
> >>>>>>>SORT='/usr/bin/sort'
> >>>>>>>SSE42_CFLAGS='-msse4.2'
> >>>>>>>SSH='/usr/bin/ssh'
> >>>>>>>
> >>>>>>>(gcc --help={target,optimizers,warnings,undocumented,params,c} 2>&1 || 
> >>>>>>>$CC -v --help 2>&1) | grep -- '[^0-9A-Za-z]msse4.2[^0-9A-Za-z]' 2>&1
> >>>>>>>   -msse4.2                    Support MMX, SSE, SSE2, SSE3, SSSE3, 
> >>>>>>> SSE4.1 and
> >>>>>>>
> >>>>>>>
> >>>>>>>>Jean-Louis
> >>>>>>>Jose M Calhariz
> >>>>>>>
> >>>>>>>>On 03/02/16 03:36 PM, Jose M Calhariz wrote:
> >>>>>>>>>On Wed, Feb 03, 2016 at 02:43:49PM -0500, Jean-Louis Martineau wrote:
> >>>>>>>>>>Hi,
> >>>>>>>>>>
> >>>>>>>>>>Which gcc version? 4.3 and above should have theses instructions.
> >>>>>>>>>>
> >>>>>>>>>>$ gcc --version
> >>>>>>>>>gcc --version
> >>>>>>>>>gcc (Debian 4.9.2-10) 4.9.2
> >>>>>>>>>Copyright (C) 2014 Free Software Foundation, Inc.
> >>>>>>>>>This is free software; see the source for copying conditions.  There 
> >>>>>>>>>is NO
> >>>>>>>>>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
> >>>>>>>>>PURPOSE.
> >>>>>>>>>
> >>>>>>>>>and
> >>>>>>>>>
> >>>>>>>>>gcc --version
> >>>>>>>>>gcc (Debian 5.3.1-7) 5.3.1 20160121
> >>>>>>>>>Copyright (C) 2015 Free Software Foundation, Inc.
> >>>>>>>>>This is free software; see the source for copying conditions.  There 
> >>>>>>>>>is NO
> >>>>>>>>>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
> >>>>>>>>>PURPOSE.
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>Jean-Louis
> >>>>>>>>>>
> >>>>>>>>>Kind regards
> >>>>>>>>>Jose M Calhariz
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>On 03/02/16 02:20 PM, Jose M Calhariz wrote:
> >>>>>>>>>>>Hi,
> >>>>>>>>>>>
> >>>>>>>>>>>I am trying to compile amanda 3.3.8 on Debian but I get some errors
> >>>>>>>>>>>during linking phase.  Both on Debian sid or jessie.
> >>>>>>>>>>>
> >>>>>>>>>>>The error is:
> >>>>>>>>>>>
> >>>>>>>>>>>/bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -Wextra 
> >>>>>>>>>>>-Wparentheses -Wdeclaration-after-statement -Wmissing-prototypes 
> >>>>>>>>>>>-Wstrict-prototypes -Wmissing-declarations -Wformat 
> >>>>>>>>>>>-Wformat-security -Wsign-compare -Wfloat-equal 
> >>>>>>>>>>>-Wold-style-definition -Wno-strict-aliasing -Wno-unknown-pragmas 
> >>>>>>>>>>>-Wno-deprecated-declarations -g -O2 -fPIE -fstack-protector-strong 
> >>>>>>>>>>>-Wformat -Werror=format-security -O2 -g -Wall         
> >>>>>>>>>>>-DAMANDATES_FILE='"/var/lib/amanda/amandates"'  
> >>>>>>>>>>>-DIGNORE_TAR_ERRORS    -fPIE -pie -Wl,-z,relro -Wl,-z,now  -o 
> >>>>>>>>>>>amflock-test amflock-test.o libamanda.la libtestutils.la -lcrypto 
> >>>>>>>>>>>-L/usr/lib/i386-linux-gnu -lcurl -lm -Wl,--export-dynamic 
> >>>>>>>>>>>-lgmodule-2.0 -pthread -lgobject-2.0 -lgthread-2.0 -pthread 
> >>>>>>>>>>>-lglib-2.0  -lnsl -lresolv
> >>>>>>>>>>>libtool: link: gcc -Wall -Wextra -Wparentheses 
> >>>>>>>>>>>-Wdeclaration-after-statement -Wmissing-prototypes 
> >>>>>>>>>>>-Wstrict-prototypes -Wmissing-declarations -Wformat 
> >>>>>>>>>>>-Wformat-security -Wsign-compare -Wfloat-equal 
> >>>>>>>>>>>-Wold-style-definition -Wno-strict-aliasing -Wno-unknown-pragmas 
> >>>>>>>>>>>-Wno-deprecated-declarations -g -O2 -fPIE -fstack-protector-strong 
> >>>>>>>>>>>-Wformat -Werror=format-security -O2 -g -Wall 
> >>>>>>>>>>>-DAMANDATES_FILE=\"/var/lib/amanda/amandates\" -DIGNORE_TAR_ERRORS 
> >>>>>>>>>>>-fPIE -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/amflock-test 
> >>>>>>>>>>>amflock-test.o -Wl,--export-dynamic -pthread -pthread  
> >>>>>>>>>>>./.libs/libamanda.so ./.libs/libtestutils.a 
> >>>>>>>>>>>-L/usr/lib/i386-linux-gnu -lcrypto 
> >>>>>>>>>>>/usr/lib/i386-linux-gnu/libcurl.so -lm -lgmodule-2.0 -lgobject-2.0 
> >>>>>>>>>>>-lgthread-2.0 -lglib-2.0 -lnsl -lresolv -pthread -Wl,-rpath 
> >>>>>>>>>>>-Wl,/usr/lib/amanda
> >>>>>>>>>>>./.libs/libamanda.so: undefined reference to 
> >>>>>>>>>>>`__builtin_ia32_crc32si'
> >>>>>>>>>>>./.libs/libamanda.so: undefined reference to 
> >>>>>>>>>>>`__builtin_ia32_crc32qi'
> >>>>>>>>>>>./.libs/libamanda.so: undefined reference to 
> >>>>>>>>>>>`__builtin_ia32_crc32hi'
> >>>>>>>>>>>collect2: error: ld returned 1 exit status
> >>>>>>>>>>>
> >>>>>>>>>>>Before I see these warnings:
> >>>>>>>>>>>
> >>>>>>>>>>>/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H 
> >>>>>>>>>>>-I. -I../config -I../gnulib  -D_FORTIFY_SOURCE=2 
> >>>>>>>>>>>-fno-strict-aliasing -D_GNU_SOURCE -pthread 
> >>>>>>>>>>>-I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> >>>>>>>>>>>  -Wall -Wextra -Wparentheses -Wdeclaration-after-statement 
> >>>>>>>>>>>-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations 
> >>>>>>>>>>>-Wformat -Wformat-security -Wsign-compare -Wfloat-equal 
> >>>>>>>>>>>-Wold-style-definition -Wno-strict-aliasing -Wno-unknown-pragmas 
> >>>>>>>>>>>-Wno-deprecated-declarations -g -O2 -fPIE -fstack-protector-strong 
> >>>>>>>>>>>-Wformat -Werror=format-security -O2 -g -Wall    
> >>>>>>>>>>>-DAMANDATES_FILE='"/var/lib/amanda/amandates"'  
> >>>>>>>>>>>-DIGNORE_TAR_ERRORS  -MT amcrc32chw.lo -MD -MP -MF 
> >>>>>>>>>>>.deps/amcrc32chw.Tpo -c -o amcrc32chw.lo amcrc32chw.c
> >>>>>>>>>>>libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../config -I../gnulib 
> >>>>>>>>>>>-D_FORTIFY_SOURCE=2 -fno-strict-aliasing -D_GNU_SOURCE -pthread 
> >>>>>>>>>>>-I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include 
> >>>>>>>>>>>-Wall -Wextra -Wparentheses -Wdeclaration-after-statement 
> >>>>>>>>>>>-Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations 
> >>>>>>>>>>>-Wformat -Wformat-security -Wsign-compare -Wfloat-equal 
> >>>>>>>>>>>-Wold-style-definition -Wno-strict-aliasing -Wno-unknown-pragmas 
> >>>>>>>>>>>-Wno-deprecated-declarations -g -O2 -fstack-protector-strong 
> >>>>>>>>>>>-Wformat -Werror=format-security -O2 -g -Wall 
> >>>>>>>>>>>-DAMANDATES_FILE=\"/var/lib/amanda/amandates\" -DIGNORE_TAR_ERRORS 
> >>>>>>>>>>>-MT amcrc32chw.lo -MD -MP -MF .deps/amcrc32chw.Tpo -c amcrc32chw.c 
> >>>>>>>>>>> -fPIC -DPIC -o .libs/amcrc32chw.o
> >>>>>>>>>>>amcrc32chw.c: In function ‘crc32c_add_hw’:
> >>>>>>>>>>>amcrc32chw.c:183:2: warning: implicit declaration of function 
> >>>>>>>>>>>‘__builtin_ia32_crc32qi’ [-Wimplicit-function-declaration]
> >>>>>>>>>>>   crc32_0 = __builtin_ia32_crc32qi(crc32_0, *next.b.b8);
> >>>>>>>>>>>   ^
> >>>>>>>>>>>amcrc32chw.c:261:6: warning: implicit declaration of function 
> >>>>>>>>>>>‘__builtin_ia32_crc32si’ [-Wimplicit-function-declaration]
> >>>>>>>>>>>       crc32_0 = __builtin_ia32_crc32si(crc32_0, *next.b.b32++);
> >>>>>>>>>>>       ^
> >>>>>>>>>>>amcrc32chw.c:311:13: warning: implicit declaration of function 
> >>>>>>>>>>>‘__builtin_ia32_crc32hi’ [-Wimplicit-function-declaration]
> >>>>>>>>>>>              crc->crc = __builtin_ia32_crc32hi(crc->crc, 
> >>>>>>>>>>> *(uint16_t*) next.b.b8);
> >>>>>>>>>>>              ^
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>Kind regards
> >>>>>>>>>>>Jose M Calhariz
> >>>>>>>>>>>
> >>>>
> >>
> >>
> >>
> 

> diff --git a/common-src/Makefile.am b/common-src/Makefile.am
> index 25510f4..7b3c01b 100644
> --- a/common-src/Makefile.am
> +++ b/common-src/Makefile.am
> @@ -49,8 +49,8 @@ libamanda_la_SOURCES =              \
>       util.c
>  
>  libamanda_la_SOURCES += amcrc32chw.c
> -amcrc32chw.o: CFLAGS += $(SSE42_CFLAGS)
> -amcrc32chw.lo: CFLAGS += $(SSE42_CFLAGS)
> +amcrc32chw.o: AM_CFLAGS += $(SSE42_CFLAGS)
> +amcrc32chw.lo: AM_CFLAGS += $(SSE42_CFLAGS)
>  
>  # version.c is generated; see below
>  nodist_libamanda_la_SOURCES = version.c


-- 
--

Os juros que estimulam a poupança, deprimindo o consumo, são os mesmos que 
desencorajam o investimento, atrofiando o emprego

--Maurice Allais

Attachment: signature.asc
Description: Digital signature

Reply via email to