compilation error on arm debian

Bug #976700 reported by MacDeveloper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libmemcached
Fix Released
Medium
Brian Aker

Bug Description

Hi,
i'm trying to compile libemmcached, last release, on arm and it fails with the error:

make[1]: Entering directory `/opt/source/libmemcached-1.0.5'
  CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
In file included from ./libmemcached/common.h:49,
                 from ./libmemcached/csl/common.h:40,
                 from libmemcached/csl/context.cc:38:
/usr/include/c++/4.4/cstdlib:119: error: '::malloc' has not been declared
/usr/include/c++/4.4/cstdlib:127: error: '::realloc' has not been declared
In file included from ./libmemcached/common.h:103,
                 from ./libmemcached/csl/common.h:40,
                 from libmemcached/csl/context.cc:38:
./libmemcached/memory.h: In function 'void* libmemcached_malloc(const memcached_st*, size_t)':
./libmemcached/memory.h:67: error: '::malloc' has not been declared
./libmemcached/memory.h:68: error: expected ';' before '}' token
./libmemcached/memory.h: In function 'void* libmemcached_realloc(const memcached_st*, void*, size_t, size_t)':
./libmemcached/memory.h:78: error: 'realloc' was not declared in this scope
make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
make: *** [all] Error 2

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 976700] [NEW] compilation error on arm debian
Download full text (3.2 KiB)

What compiler, version?

Sent from my Ti85

On Apr 8, 2012, at 10:30, MacDeveloper <email address hidden> wrote:

> Public bug reported:
>
> Hi,
> i'm trying to compile libemmcached, last release, on arm and it fails with the error:
>
> make[1]: Entering directory `/opt/source/libmemcached-1.0.5'
> CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
> In file included from ./libmemcached/common.h:49,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> /usr/include/c++/4.4/cstdlib:119: error: '::malloc' has not been declared
> /usr/include/c++/4.4/cstdlib:127: error: '::realloc' has not been declared
> In file included from ./libmemcached/common.h:103,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> ./libmemcached/memory.h: In function 'void* libmemcached_malloc(const memcached_st*, size_t)':
> ./libmemcached/memory.h:67: error: '::malloc' has not been declared
> ./libmemcached/memory.h:68: error: expected ';' before '}' token
> ./libmemcached/memory.h: In function 'void* libmemcached_realloc(const memcached_st*, void*, size_t, size_t)':
> ./libmemcached/memory.h:78: error: 'realloc' was not declared in this scope
> make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
> make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
> make: *** [all] Error 2
>
> ** Affects: libmemcached
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> libmemcached.
> https://bugs.launchpad.net/bugs/976700
>
> Title:
> compilation error on arm debian
>
> Status in libmemcached - A C and C++ client library for memcached:
> New
>
> Bug description:
> Hi,
> i'm trying to compile libemmcached, last release, on arm and it fails with the error:
>
> make[1]: Entering directory `/opt/source/libmemcached-1.0.5'
> CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
> In file included from ./libmemcached/common.h:49,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> /usr/include/c++/4.4/cstdlib:119: error: '::malloc' has not been declared
> /usr/include/c++/4.4/cstdlib:127: error: '::realloc' has not been declared
> In file included from ./libmemcached/common.h:103,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> ./libmemcached/memory.h: In function 'void* libmemcached_malloc(const memcached_st*, size_t)':
> ./libmemcached/memory.h:67: error: '::malloc' has not been declared
> ./libmemcached/memory.h:68: error: expected ';' before '}' token
> ./libmemcached/memory.h: In function 'void* libmemcached_realloc(const memcached_st*, void*, size_t, size_t)':
> ./libmemcached/memory.h:78: error: 'realloc' was not declared in this scope
> make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
> make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
> make: *** [all] Error 2
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net...

Read more...

Revision history for this message
MacDeveloper (cbisegni) wrote :

the gcc version is :
gcc (Debian 4.4.5-8) 4.4.5

any way seem that calling configure in the way below fix(it's still compile but is hasn't stopped on memory.h):

ac_cv_func_realloc_0_nonnull=yes \
ac_cv_func_malloc_0_nonnull=yes \
./configure

Revision history for this message
MacDeveloper (cbisegni) wrote :

it's stop at:

copying selected object files to avoid basename conflicts...
  CXX libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo
  CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo
  CXXLD libmemcachedinternal/libmemcachedutilinternal.la
  CXX clients/memcapable.o
  CXX libmemcached/byteorder.o
  CXXLD clients/memcapable
g++: relro: No such file or directory
g++: now: No such file or directory
make[1]: *** [clients/memcapable] Error 1
make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
make: *** [all] Error 2

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 976700] Re: compilation error on arm debian

I'm sorry but I do not understand you. What do you believe the fix is?

Sent from my Ti85

On Apr 8, 2012, at 11:45, MacDeveloper <email address hidden> wrote:

> the gcc version is :
> gcc (Debian 4.4.5-8) 4.4.5
>
> any way seem that calling configure in the way below fix(it's still
> compile but is hasn't stopped on memory.h):
>
> ac_cv_func_realloc_0_nonnull=yes \
> ac_cv_func_malloc_0_nonnull=yes \
> ./configure
>
> --
> You received this bug notification because you are subscribed to
> libmemcached.
> https://bugs.launchpad.net/bugs/976700
>
> Title:
> compilation error on arm debian
>
> Status in libmemcached - A C and C++ client library for memcached:
> New
>
> Bug description:
> Hi,
> i'm trying to compile libemmcached, last release, on arm and it fails with the error:
>
> make[1]: Entering directory `/opt/source/libmemcached-1.0.5'
> CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
> In file included from ./libmemcached/common.h:49,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> /usr/include/c++/4.4/cstdlib:119: error: '::malloc' has not been declared
> /usr/include/c++/4.4/cstdlib:127: error: '::realloc' has not been declared
> In file included from ./libmemcached/common.h:103,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> ./libmemcached/memory.h: In function 'void* libmemcached_malloc(const memcached_st*, size_t)':
> ./libmemcached/memory.h:67: error: '::malloc' has not been declared
> ./libmemcached/memory.h:68: error: expected ';' before '}' token
> ./libmemcached/memory.h: In function 'void* libmemcached_realloc(const memcached_st*, void*, size_t, size_t)':
> ./libmemcached/memory.h:78: error: 'realloc' was not declared in this scope
> make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
> make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
> make: *** [all] Error 2
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/libmemcached/+bug/976700/+subscriptions

Revision history for this message
MacDeveloper (cbisegni) wrote :

I'm sorry for my english:-)
the error regarding the malloc and realloc is resolved putting before the ./configure the "ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes" like below:
"ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ./configure"

Also with this workaround the compilation fails giving the error described in the my last message, i have found a workaround also for this but i need to see if all tools continue's to work. The workaround consist in removing the line below from the file configure.ac:

case "$target_os" in
  *linux*)
       AS_IF([test "x$GCC" = "xyes"],
             [
              LDFLAGS="$LDFLAGS -z relro -z now"
              ])
   ;;
   esac

the os where i'm compiling is debian squeeze on arm platform kernel 2.6.34.

Revision history for this message
Brian Aker (brianaker) wrote :

Have any ideas on how to set a different rule for your platform?

Sent from my Ti85

On Apr 9, 2012, at 2:50, MacDeveloper <email address hidden> wrote:

> I'm sorry for my english:-)
> the error regarding the malloc and realloc is resolved putting before the ./configure the "ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes" like below:
> "ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ./configure"
>
> Also with this workaround the compilation fails giving the error
> described in the my last message, i have found a workaround also for
> this but i need to see if all tools continue's to work. The workaround
> consist in removing the line below from the file configure.ac:
>
> case "$target_os" in
> *linux*)
> AS_IF([test "x$GCC" = "xyes"],
> [
> LDFLAGS="$LDFLAGS -z relro -z now"
> ])
> ;;
> esac
>
> the os where i'm compiling is debian squeeze on arm platform kernel
> 2.6.34.
>
> --
> You received this bug notification because you are subscribed to
> libmemcached.
> https://bugs.launchpad.net/bugs/976700
>
> Title:
> compilation error on arm debian
>
> Status in libmemcached - A C and C++ client library for memcached:
> New
>
> Bug description:
> Hi,
> i'm trying to compile libemmcached, last release, on arm and it fails with the error:
>
> make[1]: Entering directory `/opt/source/libmemcached-1.0.5'
> CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
> In file included from ./libmemcached/common.h:49,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> /usr/include/c++/4.4/cstdlib:119: error: '::malloc' has not been declared
> /usr/include/c++/4.4/cstdlib:127: error: '::realloc' has not been declared
> In file included from ./libmemcached/common.h:103,
> from ./libmemcached/csl/common.h:40,
> from libmemcached/csl/context.cc:38:
> ./libmemcached/memory.h: In function 'void* libmemcached_malloc(const memcached_st*, size_t)':
> ./libmemcached/memory.h:67: error: '::malloc' has not been declared
> ./libmemcached/memory.h:68: error: expected ';' before '}' token
> ./libmemcached/memory.h: In function 'void* libmemcached_realloc(const memcached_st*, void*, size_t, size_t)':
> ./libmemcached/memory.h:78: error: 'realloc' was not declared in this scope
> make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
> make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
> make: *** [all] Error 2
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/libmemcached/+bug/976700/+subscriptions

Revision history for this message
MacDeveloper (cbisegni) wrote :
Download full text (4.5 KiB)

Later in the afternoon i'll try to investigate, checking that all tools continue's to work.
On 09/apr/2012, at 11:54, Brian Aker wrote:

> Have any ideas on how to set a different rule for your platform?
>
> Sent from my Ti85
>
> On Apr 9, 2012, at 2:50, MacDeveloper <email address hidden> wrote:
>
>> I'm sorry for my english:-)
>> the error regarding the malloc and realloc is resolved putting before the ./configure the "ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes" like below:
>> "ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes ./configure"
>>
>> Also with this workaround the compilation fails giving the error
>> described in the my last message, i have found a workaround also for
>> this but i need to see if all tools continue's to work. The workaround
>> consist in removing the line below from the file configure.ac:
>>
>> case "$target_os" in
>> *linux*)
>> AS_IF([test "x$GCC" = "xyes"],
>> [
>> LDFLAGS="$LDFLAGS -z relro -z now"
>> ])
>> ;;
>> esac
>>
>> the os where i'm compiling is debian squeeze on arm platform kernel
>> 2.6.34.
>>
>> --
>> You received this bug notification because you are subscribed to
>> libmemcached.
>> https://bugs.launchpad.net/bugs/976700
>>
>> Title:
>> compilation error on arm debian
>>
>> Status in libmemcached - A C and C++ client library for memcached:
>> New
>>
>> Bug description:
>> Hi,
>> i'm trying to compile libemmcached, last release, on arm and it fails with the error:
>>
>> make[1]: Entering directory `/opt/source/libmemcached-1.0.5'
>> CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
>> In file included from ./libmemcached/common.h:49,
>> from ./libmemcached/csl/common.h:40,
>> from libmemcached/csl/context.cc:38:
>> /usr/include/c++/4.4/cstdlib:119: error: '::malloc' has not been declared
>> /usr/include/c++/4.4/cstdlib:127: error: '::realloc' has not been declared
>> In file included from ./libmemcached/common.h:103,
>> from ./libmemcached/csl/common.h:40,
>> from libmemcached/csl/context.cc:38:
>> ./libmemcached/memory.h: In function 'void* libmemcached_malloc(const memcached_st*, size_t)':
>> ./libmemcached/memory.h:67: error: '::malloc' has not been declared
>> ./libmemcached/memory.h:68: error: expected ';' before '}' token
>> ./libmemcached/memory.h: In function 'void* libmemcached_realloc(const memcached_st*, void*, size_t, size_t)':
>> ./libmemcached/memory.h:78: error: 'realloc' was not declared in this scope
>> make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
>> make[1]: Leaving directory `/opt/source/libmemcached-1.0.5'
>> make: *** [all] Error 2
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/libmemcached/+bug/976700/+subscriptions
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/976700
>
> Title:
> compilation error on arm debian
>
> Status in libmemcached - A C and C++ client library for memcached:
> New
>
> Bug description:
> Hi,
> i'm trying to compile...

Read more...

Revision history for this message
MacDeveloper (cbisegni) wrote :

Later in the afternoon i'll try to investigate, checking that all tools continue's to work.

Revision history for this message
Brian Aker (brianaker) wrote :

I am updating the code to use for std headers.

Brian Aker (brianaker)
Changed in libmemcached:
assignee: nobody → Brian Aker (brianaker)
milestone: none → 1.0.7
importance: Undecided → Medium
status: New → In Progress
Brian Aker (brianaker)
Changed in libmemcached:
status: In Progress → 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.