1753797 Members
7300 Online
108805 Solutions
New Discussion юеВ

Re: Error building socat

 
Joseph Snukis
Advisor

Error building socat

I'm trying to build socat on an B.11.11 system using gcc. I've downloaded the requisite packages but it keeps dying on:

gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c socat.c
gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c xioinitialize.c
gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c xiohelp.c
gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c xioparam.c
gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c xiodiag.c
gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c xioopen.c
xioopen.c: In function 'socat_open':
xioopen.c:369: warning: unused variable 'newpipesep'
gcc -O -D_GNU_SOURCE -Wall -Wno-parentheses -DHAVE_CONFIG_H -I. -c xioopts.c
xioopts.c: In function 'parseopts_table':
xioopts.c:1724: warning: the address of 'token' will always evaluate as 'true'
xioopts.c: In function 'applyopts_single':
xioopts.c:3659: error: 'union integral' has no member named 'u_ip_mreq'
xioopts.c:3664: error: 'union integral' has no member named 'u_ip_mreq'
xioopts.c:3666: error: 'union integral' has no member named 'u_ip_mreq'
*** Error exit code 1

I've found references to stdint.h in the config.log, but I thought that was strictly MS? I've also gotten an error that netinet/ip.h was unalbe to be built. Thanks in advance for any suggestions.
5 REPLIES 5
Steven Schweda
Honored Contributor

Re: Error building socat

> I'm trying to build [...]

Some program from some undisclosed source,
in some undisclosed way. Swell.

Not being able to see your source code is a
handicap. How's "union integral" declared?

A Google search for "u_ip_mreq" led to some
#if defined(HAVE_STRUCT_IP_MREQ)
conditionality, which is suggestive. I don't
see a u_ip_mreq in any system header files on
an B.11.23 ia64 system. Sounds like a defect
in the (auto-) configuration stuff for this
kit. Or else in the way it was used.

> I've also gotten an error that netinet/ip.h
> was unalbe to be built.

td176> find /usr/include -name ip.h
/usr/include/netinet/ip.h

Normally, you don't need to build it.

I can't tell who has the problems, but there
seems to be no shortage of them.
Joseph Snukis
Advisor

Re: Error building socat

Steven, understood, this was a tad light on detail. I'm tryin to build socat-1.6.0.1 on an HPUX 11.11 system. I've attached the log from the configure command, that's where I saw the error referenceing netinet/ip.h - I've never heard of that one either. Prior to trying to build this code, I installed :
autoconf-2.61
gcc-4.2.2
gettext-0.17
libgcc-4.2.3
libiconv-1.12
zlib-1.2.3

My best guess is that I missed comsthing, what I'm not sure. Again, thanks for any suggestions.
Steven Schweda
Honored Contributor

Re: Error building socat

A frequent problem with GCC and system header
files is using a GCC which was built on a
different OS version, but that does not seem
to be the problem here.

In this case, it appears that our
has a serious need for
, to get "struct in_addr" (on
line 83) to make any sense, and the
configuration stuff here seems not to expect
that requirement.

I see that the failing test seems to suggest
some hope:

| #define HAVE_NETINET_IN_H 1

but then doesn't seem to care, failing to
include the thing in its test program.

I try pretty hard to avoid autoconf et al.,
so I'd tend to complain to the authors. I'd
assume that I could fix the configure test,
but if the test is bad, I'd rather expect the
actual code to be similarly troubled, and,
being lazy as well as ignorant, if I could
persuade someone else to make the adjustment,
I might feel better about the whole thing.

Also, that problem looks like only the first
of many. Perhaps you could enlighten the
authors as to the many joys of testing their
code on the many HP TestDrive systems. (It's
that, or do some actual work, I'd guess.)
Steven Schweda
Honored Contributor

Re: Error building socat

You can fool the thing on the ip.h problem
fairly simply by creating your own ip.h in a
new directory:

dy # cat incl/netinet/ip.h
#include "/usr/include/netinet/in_systm.h"
#include "/usr/include/netinet/in.h"
#include "/usr/include/netinet/ip.h"

and mentioning this directory to "configure":

CPPFLAGS='-Iincl' ./configure

It also helps to take out the

#define WITH_IP6 1

in config.h before trying to use it ("make").

Getting past the "u_ip_mreq" problem appears
to require more effort, and I seem to be too
lazy to persue it.
Gerhard Rieger
New Member

Re: Error building socat

Hi, on td192.testdrive.hp.com which appears to run HP-UX B.11.11 socat 1.6.0.1 configures and compiles well for me. Most of the (minor) problems that occur seem to be caused by HP-UX weaknesses.