[email protected] writes:
- Hello,
- 
- i'm trying to compile amanda-3.3.9 on  freebsd 10.2-RELEASE-p20,
- because i didn't find any packages.
-
- I get the following Error on gmake:
- 
- libtool: link: ( cd ".libs" && rm -f "libtestutils.la" && ln -s
- "../libtestutils.la" "libtestutils.la" )
- gcc -DHAVE_CONFIG_H -I. -I../config -I../gnulib -I../common-src
- -D_THREAD_SAFE -D_GNU_SOURCE -I/usr/local/include
- -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
- -I/usr/local/include -pthread   -I/usr/local/include  -g -O2  -MT
- amflock-test.o -MD -MP -MF .deps/amflock-test.Tpo -c -o amflock-test.o
- amflock-test.c
- amflock-test.c: In function 'test_intra_proc_locking':
- amflock-test.c:309:5: warning: 'g_thread_create' is deprecated (declared
- at /usr/local/include/glib-2.0/glib/deprecated/gthread.h:104): Use
- 'g_thread_new' instead [-Wdeprecated-declarations]
-      thd =3D g_thread_create((GThreadFunc)test_intra_proc_locking_thd,
- (gpointer)thd_fds, TRUE, NULL);
-      ^
- mv -f .deps/amflock-test.Tpo .deps/amflock-test.Po
- /bin/sh ../libtool  --tag=3DCC   --mode=3Dlink gcc  -g -O2     -o amflock-test
- amflock-test.o libamanda.la libtestutils.la -lcrypto -L/usr/local/lib
- -lcurl -lm -L/usr/local/lib -Wl,--export-dynamic -lgmodule-2.0
- -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lintl   -lintl
- libtool: link: gcc -g -O2 -o .libs/amflock-test amflock-test.o
- -Wl,--export-dynamic -pthread  ./.libs/libamanda.so
- -L/usr/local/lib ./.libs/libtestutils.a -lcrypto -lcurl -lm -lgmodule-2.0
- -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl -pthread -Wl,-rpath
- -Wl,/usr/local/lib/amanda
- /usr/local/bin/ld: warning: libcrypto.so.7, needed
- by /usr/local/lib/libcurl.so, may conflict with libcrypto.so.8
- ./.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'
- ./.libs/libamanda.so: undefined reference to `__builtin_ia32_crc32di'
- collect2: error: ld returned 1 exit status
- gmake[3]: *** [Makefile:2210: amflock-test] Error 1
- gmake[3]: Leaving directory '/usr/src/amanda-3.3.9/common-src'
- gmake[2]: *** [Makefile:2063: all] Error 2
- gmake[2]: Leaving directory '/usr/src/amanda-3.3.9/common-src'
- gmake[1]: *** [Makefile:1668: all-recursive] Error 1
- gmake[1]: Leaving directory '/usr/src/amanda-3.3.9'
- gmake: *** [Makefile:1592: all] Error 2
- 
- Any ideas how to fix this?

The amanda build infrastructure is assuming gcc, and the gcc
supporting libraries/infrastructure. (amanda-developers, hint,
all the world does not run on linux, nor does it use gcc :D )

When I started attempting to update the pkgsrc package(s) for
amanda, I found I needed to apply the following patch, at least
to quiet the above error.  I don't know if it will create a
functioning build yet or not (the pkgsrc package update project
got stashed on a back burner not long after.)


$NetBSD$

Disable attempting to use GCC __builtin_ functions.

To do this correctly, there should be a feature test in the configure
program. (I'll try to make those changes later..)

--- common-src/util.c.orig      2016-02-09 22:52:51.000000000 +0000
+++ common-src/util.c
@@ -1727,7 +1727,7 @@ make_amanda_tmpdir(void)
 }
 
 #define POLY 0x82F63B78
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
 static int get_sse42(void)
 {
     uint32_t op, eax, ebx, ecx, edx;
@@ -1759,7 +1759,7 @@ static gboolean crc_initialized = FALSE;
 int have_sse42 = 0;
 void (* crc32_function)(uint8_t *buf, size_t len, crc_t *crc);
 
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
   #include "amcrc32chw.h"
 #endif
 
@@ -1772,7 +1772,7 @@ make_crc_table(void)
     int slice;
 
     if (!crc_initialized) {
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
        have_sse42 = get_sse42();
        if (have_sse42) {
            crc32c_init_hw();

--
Eric Schnoebelen                [email protected]           http://www.cirr.com
  Those who cannot remember the past are doomed to buy Microsoft products.
$NetBSD$

Disable attempting to use GCC __builtin_ functions.

To do this correctly, there should be a feature test in the configure
program. (I'll try to make those changes later..)

--- common-src/util.c.orig      2016-02-09 22:52:51.000000000 +0000
+++ common-src/util.c
@@ -1727,7 +1727,7 @@ make_amanda_tmpdir(void)
 }
 
 #define POLY 0x82F63B78
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
 static int get_sse42(void)
 {
     uint32_t op, eax, ebx, ecx, edx;
@@ -1759,7 +1759,7 @@ static gboolean crc_initialized = FALSE;
 int have_sse42 = 0;
 void (* crc32_function)(uint8_t *buf, size_t len, crc_t *crc);
 
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
   #include "amcrc32chw.h"
 #endif
 
@@ -1772,7 +1772,7 @@ make_crc_table(void)
     int slice;
 
     if (!crc_initialized) {
-#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__)
+#if defined __GNUC__ && GCC_VERSION > 40300 && (defined __x86_64__ || defined 
__i386__ || defined __i486__ || defined __i586__ || defined __i686__) && 0
        have_sse42 = get_sse42();
        if (have_sse42) {
            crc32c_init_hw();

Reply via email to