Ticket #24591 (closed defect: duplicate)
postgres83 fails to build +universal
| Reported by: | jeremyhu@… | Owned by: | mww@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.8.2 |
| Keywords: | Cc: | ||
| Port: | postgresql83 |
Description
/usr/bin/gcc-4.2 -no-cpp-precomp -O0 -ggdb3 -arch x86_64 -arch i386 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../../src/include -I/opt/local/include -I/opt/local/include/ossp -I/opt/local/include/libxml2 -I/opt/local/include -c -o heaptuple.o heaptuple.c heaptuple.c: In function 'heap_fill_tuple': heaptuple.c:250: error: duplicate case value heaptuple.c:250: error: previously used here heaptuple.c: In function 'DataFill': heaptuple.c:383: error: duplicate case value heaptuple.c:383: error: previously used here lipo: can't figure out the architecture type of: /var/tmp//cceMu6DA.out gnumake[4]: *** [heaptuple.o] Error 1 gnumake[3]: *** [common-recursive] Error 2 gnumake[2]: *** [access-recursive] Error 2 gnumake[1]: *** [all] Error 2 gnumake: *** [all] Error 2 shell command " cd "/opt/local/var/macports/build/_Users_jeremy_src_macports-trunk_dports_databases_postgresql83/work/postgresql-8.3.10" && /usr/bin/gnumake " returned error 2 Error: Target org.macports.build returned: shell command failed Warning: the following items did not execute (for postgresql83): org.macports.destroot org.macports.build Log for postgresql83 is at: /opt/local/var/macports/logs/_Users_jeremy_src_macports-trunk_dports_databases_postgresql83/main.log Error: Unable to upgrade port: 1 To report a bug, see <http://guide.macports.org/#project.tickets>
Looks like the problem is in the macro for store_att_byval as that is what is expanded at the erroring lines. This macro is defined in src/include/access/tupmacs.h:
/*
* store_att_byval is a partial inverse of fetch_att: store a given Datum
* value into a tuple data area at the specified address. However, it only
* handles the byval case, because in typical usage the caller needs to
* distinguish by-val and by-ref cases anyway, and so a do-it-all macro
* wouldn't be convenient.
*/
#if SIZEOF_DATUM == 8
#define store_att_byval(T,newdatum,attlen) \
do { \
switch (attlen) \
{ \
case sizeof(char): \
*(char *) (T) = DatumGetChar(newdatum); \
break; \
case sizeof(int16): \
*(int16 *) (T) = DatumGetInt16(newdatum); \
break; \
case sizeof(int32): \
*(int32 *) (T) = DatumGetInt32(newdatum); \
break; \
case sizeof(Datum): \
*(Datum *) (T) = (newdatum); \
break; \
default: \
elog(ERROR, "unsupported byval length: %d", \
(int) (attlen)); \
break; \
} \
} while (0)
#else /* SIZEOF_DATUM != 8 */
#define store_att_byval(T,newdatum,attlen) \
do { \
switch (attlen) \
{ \
case sizeof(char): \
*(char *) (T) = DatumGetChar(newdatum); \
break; \
case sizeof(int16): \
*(int16 *) (T) = DatumGetInt16(newdatum); \
break; \
case sizeof(int32): \
*(int32 *) (T) = DatumGetInt32(newdatum); \
break; \
default: \
elog(ERROR, "unsupported byval length: %d", \
(int) (attlen)); \
break; \
} \
} while (0)
#endif /* SIZEOF_DATUM == 8 */
It looks like SIZEOF_DATUM is probably getting set during configure based on just one of the architectures
Change History
Note: See
TracTickets for help on using
tickets.


Should be essentially the same fix as for 8.4 in r63149.