pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/43108: "mysql51-server" package doesn't build under NetBSD/i386



The following reply was made to PR pkg/43108; it has been noted by GNATS.

From: Takahiro Kambe <taca%back-street.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/43108: "mysql51-server" package doesn't build under
 NetBSD/i386
Date: Sun, 04 Apr 2010 01:02:17 +0900 (JST)

 In message <20100403140500.AF05F63B86C%www.NetBSD.org@localhost>
        on Sat,  3 Apr 2010 14:05:00 +0000 (UTC),
        tron%zhadum.org.uk@localhost wrote:
 > libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I../../include -I../../regex 
 > -I./include -I../../sql -Dunix 
 > -I/usr/pkgsrc/databases/mysql51-server/work/.buildlink/include/mysql 
 > -DMYSQL_DYNAMIC_PLUGIN -O2 -DUSE_OLD_FUNCTIONS -fPIC -DPIC -fPIC 
 > -fno-implicit-templates -fno-exceptions -fno-rtti -c handler/ha_innodb.cc  
 > -fPIC -DPIC -o .libs/ha_innodb_plugin_la-ha_innodb.o
 > ./include/sync0sync.ic: In function 'unsigned char 
 > mutex_test_and_set(ib_mutex_t*)':
 > ./include/sync0sync.ic:83: error: 'atomic_swap_uchar' was not declared in 
 > this scope
 > ./include/sync0sync.ic: In function 'void 
 > mutex_reset_lock_word(ib_mutex_t*)':
 > ./include/sync0sync.ic:114: error: 'atomic_swap_uchar' was not declared in 
 > this scope
 > ./include/sync0rw.ic: In function 'void 
 > rw_lock_set_writer_id_and_recursion_flag(rw_lock_t*, ulint)':
 > ./include/sync0rw.ic:281: error: cannot convert '__pthread_st* volatile*' to 
 > 'volatile __uint32_t*' for argument '1' to '__uint32_t 
 > atomic_cas_32(volatile __uint32_t*, __uint32_t, __uint32_t)'
 > gmake[2]: *** [ha_innodb_plugin_la-ha_innodb.lo] Error 1
 > gmake[2]: Leaving directory 
 > `/usr/pkgsrc/databases/mysql51-server/work/mysql-5.1.44/storage/innodb_plugin'
 > gmake[1]: *** [all-recursive] Error 1
 > gmake[1]: Leaving directory 
 > `/usr/pkgsrc/databases/mysql51-server/work/mysql-5.1.44/storage'
 > gmake: *** [all-recursive] Error 1
 > *** Error code 2
 > 
 > Stop.
 > make: stopped in /usr/pkgsrc/databases/mysql51-server
 atomic_swap_uchar seems to exist on Solaris since it exists in
 HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS.
 
 > Interestingly the package builds fine under NetBSD/amd64 5.0_STABLE.
 configure tryied to compile below code for HAVE_IB_GCC_ATOMIC_BUILTINS
 was usable or not.
 
 It succeeded on NetBSD/i386 5.99.25 but failed on 5.0_STABLE:
 test.c:(.text+0x2f): undefined reference to `__sync_bool_compare_and_swap_4'
 test.c:(.text+0x75): undefined reference to `__sync_bool_compare_and_swap_4'
 test.c:(.text+0xb3): undefined reference to `__sync_add_and_fetch_4'
 
 It is difference between NetBSD i386 5.0_STABLE and current.
 
 int main()
 {
   long x;
   long y;
   long res;
   char c;
 
   x = 10;
   y = 123;
   res = __sync_bool_compare_and_swap(&x, x, y);
   if (!res || x != y) {
     return(1);
   }
 
   x = 10;
   y = 123;
   res = __sync_bool_compare_and_swap(&x, x + 1, y);
   if (res || x != 10) {
     return(1);
   }
 
   x = 10;
   y = 123;
   res = __sync_add_and_fetch(&x, y);
   if (res != 123 + 10 || x != 123 + 10) {
     return(1);
   }
 
   c = 10;
   res = __sync_lock_test_and_set(&c, 123);
   if (res != 10 || c != 123) {
     return(1);
   }
 
   return(0);
 }
 
 -- 
 Takahiro Kambe <taca%back-street.net@localhost>
 


Home | Main Index | Thread Index | Old Index