Operating System - Linux
1827872 Members
1132 Online
109969 Solutions
New Discussion

configure: error: Need to know how to pack structures with this compiler

 
ambika_1
Frequent Advisor

configure: error: Need to know how to pack structures with this compiler

Hi,
I am working on HP UX 11.11 OS. Trying to build clamAV using gcc for 11.11 64 bit version.
I am getting above error. How to resolve that?
4 REPLIES 4
Peter Godron
Honored Contributor

Re: configure: error: Need to know how to pack structures with this compiler

Hi,
found on the WEB:
1.
> ....and the problem is not due to the #pragma packed test, but is due to
> configure trying to link tcpwrapper (-lwrap) in.
>
> You could try:
>
> ./configure --without-tcpwrappers

2.
Could you try compiling the attachment, and running it, and noting the
output. Then do it again with each of the following compiler flags
added, one per re-compile:

-xmemalign=1s
-xmemalign=8i
-xmemalign=2i



Cheers,
-trog


int main(int argc, char **argv) {
#pragma pack(1)
struct { char c; long l; } s;
if (sizeof(s)==sizeof(s.c)+sizeof(s.l)) {
printf("ok\n");
} else {
printf("not ok\n");
}
}

Please let us know if either solves your problem !
Robert-Jan Goossens
Honored Contributor

Re: configure: error: Need to know how to pack structures with this compiler

Ambika,

ClamAV is included in the hpuxiexpress1 A.06.00-004 package (free download)

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111

Regards,
Robert-Jan
Stephen Keane
Honored Contributor

Re: configure: error: Need to know how to pack structures with this compiler

FWIW, if you want to pack a structure in gcc, you can use __attribute__((packed))


e.g.

typedef struct tagX
{
int A;
int B;
} __attribute__((packed)) X, *pX;


Peter Godron
Honored Contributor

Re: configure: error: Need to know how to pack structures with this compiler

ambika,
any update on this?