Hello,
I am trying to build zlib 1.2.8 with icc and icpc on Ubuntu 14.04. I get the following messages when I run ./configure --prefix=/usr/local/zlib1.2.8.
Then when I type make fails ld: cannot find -lstdc++. Any comments appreciated.
Regards,
Ashwin.
Checking for shared library support...
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.8 with icc.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... No.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... No.
WARNING: vsnprintf() not found, falling back to vsprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return value of vsprintf()... Yes.
Checking for attribute(visibility) support... Yes.
ind -lstdc++
(exit code 1)
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.8 with icc.
=== ztest3899.c ===
#include <sys/types.h>
off64_t dummy = 0;
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 ztest3899.c
Checking for off64_t... Yes.
Checking for fseeko... Yes.
=== ztest3899.c ===
#include <string.h>
#include <errno.h>
int main() { return strlen(strerror(errno)); }
===
icc -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -o ztest3899 ztest3899.c
ld: cannot find -lstdc++
(exit code 1)
Checking for strerror... No.
=== ztest3899.c ===
#include <unistd.h>
int main() { return 0; }
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR ztest3899.c
Checking for unistd.h... Yes.
=== ztest3899.c ===
#include <stdarg.h>
int main() { return 0; }
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR ztest3899.c
Checking for stdarg.h... Yes.
=== ztest3899.c ===
#include <stdio.h>
#include <stdarg.h>
#include "zconf.h"
int main()
{
#ifndef STDC
choke me
#endif
return 0;
}
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR ztest3899.c
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
=== ztest3899.c ===
#include <stdio.h>
#include <stdarg.h>
int mytest(const char *fmt, ...)
{
char buf[20];
va_list ap;
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return 0;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
===
icc -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -o ztest3899 ztest3899.c
ld: cannot find -lstdc++
(exit code 1)
Checking for vsnprintf() in stdio.h... No.
WARNING: vsnprintf() not found, falling back to vsprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
=== ztest3899.c ===
#include <stdio.h>
#include <stdarg.h>
int mytest(const char *fmt, ...)
{
int n;
char buf[20];
va_list ap;
va_start(ap, fmt);
n = vsprintf(buf, fmt, ap);
va_end(ap);
return n;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf ztest3899.c
Checking for return value of vsprintf()... Yes.
=== ztest3899.c ===
#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
int ZLIB_INTERNAL foo;
int main()
{
return 0;
}
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf ztest3899.c
Checking for attribute(visibility) support... Yes.
ALL = static all64
AR = ar
ARFLAGS = rc
CC = icc
CFLAGS = -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN
CPP = icc -E
EXE =
LDCONFIG = ldconfig
LDFLAGS =
LDSHARED = icc
LDSHAREDLIBC = -lc
OBJC = $(OBJZ) $(OBJG)
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
RANLIB = ranlib
SFLAGS = -O3 -ip -D_LARGEFILE64_SOURCE=1 -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN
SHAREDLIB =
SHAREDLIBM =
SHAREDLIBV =
STATICLIB = libz.a
TEST = all teststatic test64
VER = 1.2.8
Z_U4 =
exec_prefix = ${prefix}
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
mandir = ${prefix}/share/man
prefix = /usr/local/zlib-1.2.8
sharedlibdir = ${libdir}
uname = Linux
--------------------
--------------------
./configure --prefix=/usr/local/zlib-1.2.8
Sun Aug 24 13:37:37 IST 2014
=== ztest4124.c ===
extern int getchar();
int hello() {return getchar();}
===
icc -c ztest4124.c
... using gcc
Checking for obsessive-compulsive compiler options...
=== ztest4124.c ===
int foo() { return 0; }
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 ztest4124.c
Checking for shared library support...
=== ztest4124.c ===
extern int getchar();
int hello() {return getchar();}
===
icc -w -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -fPIC ztest4124.c
icc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -ip -D_LARGEFILE64_SOURCE=1 -fPIC -o ztest4124.so ztest4124.o
ld: cannot find -lstdc++
(exit code 1)
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.8 with icc.
=== ztest4124.c ===
#include <sys/types.h>
off64_t dummy = 0;
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 ztest4124.c
Checking for off64_t... Yes.
Checking for fseeko... Yes.
=== ztest4124.c ===
#include <string.h>
#include <errno.h>
int main() { return strlen(strerror(errno)); }
===
icc -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -o ztest4124 ztest4124.c
ld: cannot find -lstdc++
(exit code 1)
Checking for strerror... No.
=== ztest4124.c ===
#include <unistd.h>
int main() { return 0; }
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR ztest4124.c
Checking for unistd.h... Yes.
=== ztest4124.c ===
#include <stdarg.h>
int main() { return 0; }
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR ztest4124.c
Checking for stdarg.h... Yes.
=== ztest4124.c ===
#include <stdio.h>
#include <stdarg.h>
#include "zconf.h"
int main()
{
#ifndef STDC
choke me
#endif
return 0;
}
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR ztest4124.c
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
=== ztest4124.c ===
#include <stdio.h>
#include <stdarg.h>
int mytest(const char *fmt, ...)
{
char buf[20];
va_list ap;
va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return 0;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
===
icc -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -o ztest4124 ztest4124.c
ld: cannot find -lstdc++
(exit code 1)
Checking for vsnprintf() in stdio.h... No.
WARNING: vsnprintf() not found, falling back to vsprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
=== ztest4124.c ===
#include <stdio.h>
#include <stdarg.h>
int mytest(const char *fmt, ...)
{
int n;
char buf[20];
va_list ap;
va_start(ap, fmt);
n = vsprintf(buf, fmt, ap);
va_end(ap);
return n;
}
int main()
{
return (mytest("Hello%d\n", 1));
}
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf ztest4124.c
Checking for return value of vsprintf()... Yes.
=== ztest4124.c ===
#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
int ZLIB_INTERNAL foo;
int main()
{
return 0;
}
===
icc -c -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf ztest4124.c
Checking for attribute(visibility) support... Yes.
ALL = static all64
AR = ar
ARFLAGS = rc
CC = icc
CFLAGS = -O3 -ip -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN
CPP = icc -E
EXE =
LDCONFIG = ldconfig
LDFLAGS =
LDSHARED = icc
LDSHAREDLIBC = -lc
OBJC = $(OBJZ) $(OBJG)
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
RANLIB = ranlib
SFLAGS = -O3 -ip -D_LARGEFILE64_SOURCE=1 -fPIC -D_LARGEFILE64_SOURCE=1 -DNO_STRERROR -DNO_vsnprintf -DHAVE_HIDDEN
SHAREDLIB =
SHAREDLIBM =
SHAREDLIBV =
STATICLIB = libz.a
TEST = all teststatic test64
VER = 1.2.8
Z_U4 =
exec_prefix = ${prefix}
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
mandir = ${prefix}/share/man
prefix = /usr/local/zlib-1.2.8
sharedlibdir = ${libdir}
uname = Linux
--------------------