percona-xtrabackup-2.0.1 will not compile in Solaris 11 due to parameter mismatch with getpwuid_r and getgrgid_r functions

Reported by Jaime Sicam on 2012-08-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
Status tracked in 2.2
2.0
Low
Unassigned
2.1
Low
Unassigned
2.2
Low
Unassigned

Bug Description

Error Snippet:
* * *
[ 11%] Building C object libarchive/CMakeFiles/archive_static.dir/archive_entry_copy_stat.c.o
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c: In function ‘lookup_uname_helper’:
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:201:11: error: too many arguments to function ‘getpwuid_r’
/usr/include/pwd.h:167:23: note: declared here
cc1: warnings being treated as errors
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:200:5: error: assignment makes integer from pointer without a cast
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c: In function ‘lookup_gname_helper’:
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:265:11: error: too many arguments to function ‘getgrgid_r’
/usr/include/grp.h:154:22: note: declared here
/root/newdir/percona-xtrabackup-2.0.1/src/libarchive/libarchive/archive_read_disk_set_standard_lookup.c:264:5: error: assignment makes integer from pointer without a cast
gmake[2]: *** [libarchive/CMakeFiles/archive.dir/archive_read_disk_set_standard_lookup.c.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
[ 12%] Building C object libarchive/CMakeFiles/archive_static.dir/archive_entry_link_resolver.c.o
* * *

Workaround:
Add the following code right before the last line in src/libarchive/libarchive/archive_platform.h
#ifndef _POSIX_PTHREAD_SEMANTICS
#define _POSIX_PTHREAD_SEMANTICS
#endif

Jaime Sicam (jssicam) on 2012-08-05
tags: added: i25303
summary: percona-xtrabackup-2.0.1 will not compile in Solaris 11 due to
- parameter mismatch with getpwuid_r and getgtgid_r functions
+ parameter mismatch with getpwuid_r and getgrgid_r functions
Stewart Smith (stewart) on 2012-08-06
Changed in percona-xtrabackup:
status: New → Won't Fix
Stewart Smith (stewart) on 2012-08-06
Changed in percona-xtrabackup:
importance: Undecided → Low
status: Won't Fix → Triaged
Jaime Sicam (jssicam) wrote :

Here's a patch that updates CFLAGS under utils/build.sh so we don't need to change any code in libarchive.

Jaime Sicam (jssicam) wrote :

Here's an alternative patch using -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ as compiler flags
As mentioned by Raghu, these flags are platform independent.

Reference:
http://code.google.com/p/libarchive/issues/detail?id=61

Alexey Kopytov (akopytov) wrote :

See also #1088315. Perhaps a better solution would be to either merge libarchive from upstream, or get rid of the bundled libarchive completely.

Alexey Kopytov <email address hidden> writes:
> See also #1088315. Perhaps a better solution would be to either merge
> libarchive from upstream, or get rid of the bundled libarchive
> completely.

We'll need to build against upstream libarchive for getting into
Debian... so we should just get upstream to work for us.

--
Stewart Smith

Alexey Kopytov (akopytov) wrote :

Hi Stewart,

On Tue, 26 Mar 2013 12:07:00 -0000, Stewart Smith wrote:
> Alexey Kopytov <email address hidden> writes:
>> See also #1088315. Perhaps a better solution would be to either merge
>> libarchive from upstream, or get rid of the bundled libarchive
>> completely.
>
> We'll need to build against upstream libarchive for getting into
> Debian... so we should just get upstream to work for us.
>

Yes, so depending on whether upstream provides some way to solve bug
#977998
, we will either remove bundled libarchive, or report the issue
upstream and just merge the current trunk to fix this bug as a
short-term solution.

tags: removed: i25303
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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