protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.23k stars 15.45k forks source link

Unable to build protobuf on AIX7.2 (running on Power8) with gcc #4101

Closed amandeepgautam closed 6 years ago

amandeepgautam commented 6 years ago

I am unable to build protobuf from source on AIX 7.2. The configure script fails saying that sched_yield was not found on the system. However it seems that sched_yield is present as man sched_yield bring up the corresponding man page.

bash-4.4# ./configure --prefix=/opt/cohesity
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... powerpc-ibm-aix7.2.1.0
checking host system type... powerpc-ibm-aix7.2.1.0
checking target system type... powerpc-ibm-aix7.2.1.0
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... gcc
checking whether we are using the GNU Objective C compiler... no
checking whether gcc accepts -g... no
checking dependency style of gcc... gcc3
checking C++ compiler flags...... use default: -O2  -g -DNDEBUG
checking whether __SUNPRO_CC is declared... no
checking how to print strings... print -r
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert powerpc-ibm-aix7.2.1.0 file names to powerpc-ibm-aix7.2.1.0 format... func_convert_file_noop
checking how to convert powerpc-ibm-aix7.2.1.0 file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... print -r --
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... failed
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... no
checking which variant of shared library versioning to provide... aix
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... AIX lib.a(lib.so.V)
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ANSI C header files... (cached) no
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h:     check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h:     section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------------- ##
configure: WARNING:     ## Report this to protobuf@googlegroups.com ##
configure: WARNING:     ## ---------------------------------------- ##
checking for fcntl.h... no
checking for inttypes.h... (cached) no
checking limits.h usability... no
checking limits.h presence... yes
configure: WARNING: limits.h: present but cannot be compiled
configure: WARNING: limits.h:     check for missing prerequisite headers?
configure: WARNING: limits.h: see the Autoconf documentation
configure: WARNING: limits.h:     section "Present But Cannot Be Compiled"
configure: WARNING: limits.h: proceeding with the compiler's result
configure: WARNING:     ## ---------------------------------------- ##
configure: WARNING:     ## Report this to protobuf@googlegroups.com ##
configure: WARNING:     ## ---------------------------------------- ##
checking for limits.h... no
checking for stdlib.h... (cached) no
checking for unistd.h... (cached) no
checking for working memcmp... no
checking for working strtod... no
checking for pow... no
checking for pow in -lm... no
configure: WARNING: cannot find library containing definition of pow
checking for ftruncate... no
checking for memset... no
checking for mkdir... no
checking for strchr... no
checking for strerror... no
checking for strtol... no
checking zlib version... headers missing or too old (requires 1.2.0.4)
checking for the pthreads library -lpthreads... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
checking whether to check for GCC pthread/shared inconsistencies... no
checking whether what we have so far is sufficient with -nostdlib... no
checking whether -lpthread saves the day... no
configure: WARNING: Impossible to determine how to use pthreads with shared libraries and -nostdlib
checking the location of hash_map... 
configure: WARNING: could not find an STL hash_map
checking for library containing sched_yield... no
configure: error: in `/home/woijkd/tools/protobuf-3.0.0':
configure: error: sched_yield was not found on your system
See `config.log' for more details
acozzette commented 6 years ago

We don't have access to AIX machines to test, but if you can figure out a fix then feel free to send us a pull request. You might just have to edit this line to exclude AIX from that sched_yield check: https://github.com/google/protobuf/blob/099d99759101c295244c24d8954ec85b8ac65ce3/configure.ac#L194

amandeepgautam commented 6 years ago

@acozzette I tested on aix7.2.1.0 and the configure script passes. This is my first PR so I apologize if I have missed a few conventions. If so, any pointers to correct them would be helpful.

noloader commented 6 years ago

@acozzette,

If you are providing free and open source software then you have access to the GCC Build Farm. It provides Power7 and Power8 machines running Linux and AIX. Other cpu architectures and OSes are provided, like MIPS, MIPS64 and Aarch64.

In particular, gcc119.fsffrance.org is the AIX machine running on Power8.

You can find reading at GCC Compile Farm Project (older) and The GCC Compile Farm project (newer). The user mailing list is at GCC Compile Farm Users.

You can sign up for an account at Join the project!. Once you have an account access to AIX would be something like ssh acozzette@gcc119.fsffrance.org.

acozzette commented 6 years ago

@noloader Thanks for the pointer to that project, I wasn't even aware something like that existed. I'm afraid we still can't officially support some of these less common platforms like AIX, though, just because we don't have the cycles to monitor that build and keep it running. However we are glad to keep accepting pull requests with fixes.

lqxandxl commented 6 years ago

why linux-gnu also has this questions?
centos 6.9 4.17.0-1.el6.elrepo.x86_64,gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)