make fails on Centos box

Bug #516774 reported by TheBlueSage
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libmemcached
Fix Released
Undecided
Monty Taylor
Fedora
New
Undecided
Unassigned

Bug Description

OS : Centos 5.3 - kernel 2.6.18-53.el5PAE

configure works, and finished with :
---
Configuration summary for libmemcached version 0.37

   * Installation prefix: /usr/local
   * System type: pc-linux-gnu
   * Host CPU: i686
   * C Compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
   * Assertions enabled: yes
   * Debug enabled: no
   * Warnings as failure: no

---

but when I do 'make':

 CCLD clients/memerror
  CC clients/memflush.o
  CCLD clients/memflush
  CC clients/memrm.o
  CCLD clients/memrm
  CC clients/memstat.o
  CCLD clients/memstat
  CC clients/memslap.o
  CC clients/ms_conn.o
  CC clients/ms_setting.o
  CC clients/ms_sigsegv.o
  CC clients/ms_stats.o
  CC clients/ms_task.o
  CC clients/ms_thread.o
  CCLD clients/memslap
clients/ms_conn.o: In function `ms_get_udp_request_id':
/var/go2packages/libmemcached-0.37/clients/ms_conn.c:184: undefined reference to `__sync_fetch_and_add_4'
clients/ms_conn.o: In function `ms_reconn_socks':
/var/go2packages/libmemcached-0.37/clients/ms_conn.c:1055: undefined reference to `__sync_fetch_and_add_4'
clients/ms_conn.o: In function `ms_reconn':
/var/go2packages/libmemcached-0.37/clients/ms_conn.c:924: undefined reference to `__sync_fetch_and_add_4'
/var/go2packages/libmemcached-0.37/clients/ms_conn.c:960: undefined reference to `__sync_fetch_and_add_4'
clients/ms_thread.o: In function `ms_setup_thread':
/var/go2packages/libmemcached-0.37/clients/ms_thread.c:215: undefined reference to `__sync_fetch_and_add_4'
clients/ms_thread.o:/var/go2packages/libmemcached-0.37/clients/ms_thread.c:198: more undefined references to `__sync_fetch_and_add_4' follow
collect2: ld returned 1 exit status
make[2]: *** [clients/memslap] Error 1
make[2]: Leaving directory `/var/go2packages/libmemcached-0.37'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/go2packages/libmemcached-0.37'
make: *** [all] Error 2

I get the same error when I try to compile 0.36 also ...

Revision history for this message
pc345 (randomjoe) wrote :

Any feedback on this please?

I am experiencing the same compilation problem on Fedora Core, with libmemcached 0.37

Revision history for this message
pc345 (randomjoe) wrote :

Ok, I got it to compile

./configure --disable-64bit CFLAGS="-O3 -march=i686"

Revision history for this message
Wincent Colaiuta (win-wincent) wrote :

Just ran into this on 32-bit Fedora 8 (eg. an Amazon Web Services "small instance", one of the starter Amazon Machine Images provided by Amazon).

Is there any way the config script could be modified to autodetect the platform bitsize instead of defaulting to 64-bit?

The reason why it would be handy is that the user doesn't always have control over how "./configure" is invoked. For example, installing the "memcache" RubyGem with "gem install memcache", the gem has a bundled version of libmemcached (0.38) and it prebuilds it with a hardcoded "./configure" line.

Normally with RubyGems you can pass in build options like "gem install foo -- --some-option", but that won't work here because that only applies to building the gem itself, not its dependencies. So in this case the only way to install is to run "gem install", let it fail, and then go in and hand-edit the "ext/extconf.rb" file inside the unpacked gem and finish the install manually.

I'm going to see if I can get the memcache gem patched to avoid this issue, but it would be nice for other users of libmemcached could be spared the trouble too. What do you think?

Brian Aker (brianaker)
Changed in libmemcached:
assignee: nobody → Monty Taylor (mordred)
Revision history for this message
Monty Taylor (mordred) wrote : Re: [Bug 516774] [NEW] make fails on Centos box

Gross.

I believe this is related to that atomic patch that was wonky for a while.

If we fix 0.37 for centos, where would we put that fix?

On 02/11/2011 10:08 AM, Launchpad Bug Tracker wrote:
> Brian Aker (brianaker) has assigned this bug to you for Fedora:
>
> OS : Centos 5.3 - kernel 2.6.18-53.el5PAE
>
> configure works, and finished with :
> ---
> Configuration summary for libmemcached version 0.37
>
> * Installation prefix: /usr/local
> * System type: pc-linux-gnu
> * Host CPU: i686
> * C Compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
> * Assertions enabled: yes
> * Debug enabled: no
> * Warnings as failure: no
>
> ---
>
> but when I do 'make':
>
> CCLD clients/memerror
> CC clients/memflush.o
> CCLD clients/memflush
> CC clients/memrm.o
> CCLD clients/memrm
> CC clients/memstat.o
> CCLD clients/memstat
> CC clients/memslap.o
> CC clients/ms_conn.o
> CC clients/ms_setting.o
> CC clients/ms_sigsegv.o
> CC clients/ms_stats.o
> CC clients/ms_task.o
> CC clients/ms_thread.o
> CCLD clients/memslap
> clients/ms_conn.o: In function `ms_get_udp_request_id':
> /var/go2packages/libmemcached-0.37/clients/ms_conn.c:184: undefined reference to `__sync_fetch_and_add_4'
> clients/ms_conn.o: In function `ms_reconn_socks':
> /var/go2packages/libmemcached-0.37/clients/ms_conn.c:1055: undefined reference to `__sync_fetch_and_add_4'
> clients/ms_conn.o: In function `ms_reconn':
> /var/go2packages/libmemcached-0.37/clients/ms_conn.c:924: undefined reference to `__sync_fetch_and_add_4'
> /var/go2packages/libmemcached-0.37/clients/ms_conn.c:960: undefined reference to `__sync_fetch_and_add_4'
> clients/ms_thread.o: In function `ms_setup_thread':
> /var/go2packages/libmemcached-0.37/clients/ms_thread.c:215: undefined reference to `__sync_fetch_and_add_4'
> clients/ms_thread.o:/var/go2packages/libmemcached-0.37/clients/ms_thread.c:198: more undefined references to `__sync_fetch_and_add_4' follow
> collect2: ld returned 1 exit status
> make[2]: *** [clients/memslap] Error 1
> make[2]: Leaving directory `/var/go2packages/libmemcached-0.37'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/var/go2packages/libmemcached-0.37'
> make: *** [all] Error 2
>
>
> I get the same error when I try to compile 0.36 also ...
>
> ** Affects: libmemcached
> Importance: Undecided
> Assignee: Monty Taylor (mordred)
> Status: New
>
> ** Affects: fedora
> Importance: Undecided
> Status: New
>

Brian Aker (brianaker)
Changed in libmemcached:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.