Openssh 8.0p1 compile error indicating missing 'fd_set' in kludge-fd_set.c - gnu-make

OpenSSH is configured to used openssl 3.0.0 and no error was found on configuration. On compile, an error indicating an unknown type name 'fd_set' was raised for the file kludge-fd_set.c:19:27
This is for an AIX 7.1 server that is being customized to run Hadoop. Most of the built-in features have recently been updated and as I rarely do infrastructure software development in C I am not sure which package I should look for/upgrade to get that type.
(cd openbsd-compat && make)
gcc -g -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -I. -I.. -I. -I./.. -I/usr/local/include -DHAVE_CONFIG_H -c kludge-fd_set.c
kludge-fd_set.c:19:27: error: unknown type name 'fd_set'
19 | void kludge_FD_SET(int n, fd_set *set) {
| ^~~~~~
kludge-fd_set.c:22:28: error: unknown type name 'fd_set'
22 | int kludge_FD_ISSET(int n, fd_set *set) {
| ^~~~~~
make: 1254-004 The error code from the last command is 1.
Stop.
make: 1254-004 The error code from the last command is 2.
Stop.
I'm using GCC 9.1 and the installation/compile guide have indicated that this should be an open-and-shut procedure.

The comment from Lorinczy Zsigmond was the fix I used to resolve it.

Related

R package 'RcppArmadillo' error during installation

I'm trying to install RcppArmadillo in my R environment.
I have created a Docker container starting from a Ubuntu:20.04 image and installing miniconda to manage the environment and install R.
When I install RcppArmadillo I have this error:
checking whether the C++ compiler works... no
configure: error: in `/tmp/Rtmp1znFrE/R.INSTALL3901267e6e22/RcppArmadillo':
configure: error: C++ compiler cannot create executables
I have checked the config.log file to search the error, and I found this:
gcc version 9.4.0 (conda-forge 9.4.0-15)
configure:1931: $? = 0
configure:1920: aarch64-conda-linux-gnu-c++ -std=gnu++14 -V >&5
aarch64-conda-linux-gnu-c++: error: unrecognized command line option '-V'
aarch64-conda-linux-gnu-c++: fatal error: no input files
compilation terminated.
configure:1931: $? = 1
configure:1920: aarch64-conda-linux-gnu-c++ -std=gnu++14 -qversion >&5
aarch64-conda-linux-gnu-c++: error: unrecognized command line option '-qversion'; did you mean '--version'?
aarch64-conda-linux-gnu-c++: fatal error: no input files
compilation terminated.
configure:1931: $? = 1
configure:1951: checking whether the C++ compiler works
configure:1973: aarch64-conda-linux-gnu-c++ -std=gnu++14 -fvisibility-inlines-hidden -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem /root/miniconda3/include -fdebug-prefix-map=/drone/src/build_artifacts/r-base-split_1630154255557/work=/usr/local/src/conda/r-base-4.1.1 -fdebug-prefix-map=/root/miniconda3=/usr/local/src/conda-prefix conftest.cpp >&5
/root/miniconda3/bin/../lib/gcc/aarch64-conda-linux-gnu/9.4.0/../../../../aarch64-conda-linux-gnu/bin/ld: /root/miniconda3/bin/../lib/gcc/aarch64-conda-linux-gnu/9.4.0/libstdc++.so: undefined reference to `__cxa_thread_atexit_impl#GLIBC_2.18'
collect2: error: ld returned 1 exit status
I don't understand if it's a problem of GCC (I have tried to uninstall and install again through apt-get but nothing changed), but seems really strange to me.
If I echo $PATH I get as result /root/miniconda3/bin:/usr/bin:/bin, but If I find / -name gcc I get:
/root/miniconda3/lib/R/library/BH/include/boost/mpl/aux_/preprocessed/gcc
/root/miniconda3/lib/gcc
/root/miniconda3/libexec/gcc
/root/miniconda3/libexec/gcc/aarch64-conda-linux-gnu/9.4.0/gcc
/root/miniconda3/share/licenses/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/libexec/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/libexec/gcc/aarch64-conda-linux-gnu/9.4.0/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/share/licenses/gcc
/root/miniconda3/pkgs/gcc_impl_linux-aarch64-9.4.0-h603953f_15/lib/gcc
/root/miniconda3/pkgs/libgcc-devel_linux-aarch64-9.4.0-h85f5abf_15/lib/gcc
/root/miniconda3/pkgs/libstdcxx-devel_linux-aarch64-9.4.0-h85f5abf_15/lib/gcc
/root/miniconda3/pkgs/gfortran_impl_linux-aarch64-9.4.0-h54cdb55_15/libexec/gcc
/root/miniconda3/pkgs/gfortran_impl_linux-aarch64-9.4.0-h54cdb55_15/lib/gcc
/root/miniconda3/pkgs/gxx_impl_linux-aarch64-9.4.0-h603953f_15/libexec/gcc
/usr/share/gcc
/usr/share/doc/gcc
/usr/share/doc/gcc-9-base/gcc
/usr/lib/gcc
/usr/bin/gcc
so maybe there are some mistakes in all these GCC instances.
Thanks for your help

make: *** [fusion/calvin_files/fusion/src/FusionCELData.o] Error 1

I tried to build affxparser an R package on my book, M1 MacOS 12.3.1, with R 4.1.3 and gcc 11.2.0.
However the building runs error. (as the limit of characters, i haven't put few beginning lines, to see more details can click here
g++-11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I. -Ifusion/calvin_files/array/src -Ifusion/calvin_files/data/src -Ifusion/calvin_files/exception/src -Ifusion/calvin_files/fusion/src -Ifusion/calvin_files/fusion/src/GCOSAdapter -Ifusion/calvin_files/fusion/src/CalvinAdapter -Ifusion/calvin_files/parameter/src -Ifusion/calvin_files/parsers/src -Ifusion/calvin_files/portability/src -Ifusion/calvin_files/template/src -Ifusion/calvin_files/utils/src -Ifusion/calvin_files/writers/src -Ifusion/file -Ifusion/file/TsvFile -Ifusion/portability -Ifusion/util -Ifusion -D_USE_MEM_MAPPING_ -I/opt/R/arm64/include -fPIC -mtune=native -g -O2 -Wall -pedantic -Wconversion -Wno-sign-compare -O0 -c fusion/calvin_files/fusion/src/FusionCELData.cpp -o fusion/calvin_files/fusion/src/FusionCELData.o
In file included from fusion/file/CELFileData.h:33,
from fusion/calvin_files/fusion/src/GCOSAdapter/GCOSCELDataAdapter.h:30,
from fusion/calvin_files/fusion/src/FusionCELData.cpp:24:
fusion/file/FileIO.h: In function 'uint16_t affy_swap16(uint16_t)':
fusion/file/FileIO.h:67:31: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion]
67 | return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8));
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from fusion/calvin_files/fusion/src/GCOSAdapter/GCOSCELDataAdapter.h:30,
from fusion/calvin_files/fusion/src/FusionCELData.cpp:24:
fusion/file/CELFileData.h: At global scope:
fusion/file/CELFileData.h:91:23: warning: malformed '#pragma options align={mac68k|power|reset}', ignoring [-Wpragmas]
91 | #pragma options align=packed
| ^~~~~~
fusion/file/CELFileData.h:127:23: error: too many '#pragma options align=reset'
127 | #pragma options align=reset
| ^~~~~
fusion/calvin_files/fusion/src/FusionCELData.cpp: In member function 'unsigned int affymetrix_fusion_io::FusionCELData::GetFileSize()':
fusion/calvin_files/fusion/src/FusionCELData.cpp:492:22: warning: conversion from 'int64_t' {aka 'long long int'} to 'unsigned int' may change value [-Wconversion]
492 | return Fs::fileSize(filename);
| ~~~~~~~~~~~~^~~~~~~~~~
make: *** [fusion/calvin_files/fusion/src/FusionCELData.o] Error 1
ERROR: compilation failed for package ‘affxparser’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/affxparser’
Besides, i have installed some other packages which also run error. According to some information, i wrote some codes in bash_profile and Makevars in command line.
I add codes below in bash_profile
alias gcc='gcc-11'
alias cc='gcc-11'
alias g++='g++-11'
alias c++='c++-11'
I create a Makevars which is
VER=-11
CC=gcc$(VER)
CXX=g++$(VER)
CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
FLIBS=-L/usr/local/Cellar/gcc/11.2.0/lib/gcc/11
I thought the make: ***[fusion/calvin_files/fusion/src/FusionCELData.o] Error 1 might be the problem, but I don't know how to fix it. Hope for anyone answer.
I fix this problem with hiding away those codes in my Makevars and bash_profile showed above, which turn my profiler into default clang to profile codes in affxparser. Finally, finish this.

R gputools: gcc: error: unrecognized command line option ‘-Wp’

I had an error when I install gputools in R, and I cannot find any solution by google.
I use command install.packages("gputools")
/usr/local/cuda/bin/nvcc -c -Xcompiler "-fpic -I/usr/local/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic" -I. -I"/usr/local/cuda/include" -I"/usr/lib64/R/include" rinterface.cu -o rinterface.o
gcc: error: unrecognized command line option ‘-Wp’
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘gputools’
Can someone help me here? My gpu cards is given by
01:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K620] (rev a2)
Ok, I got this working with a couple hacks. This is for centos 7.
First issue was solved by looking at the mailing list. https://github.com/nullsatz/gputools/issues/12
Edit the Makefile, and Modify line 'CFLAGS : put '\' after 'Wp' & before ','
CFLAGS = -O2 -g -pipe -Wall -Werror=format-security -Wp\,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
Second problem was that the R shared lib was not being found. I tried setting the LD_LIBRARY_PATH in the driver configuration file, and on the command line, but that did not work.
I ended up with the following hack:
cd /usr/local/cuda/lib64 && ln -s /usr/lib64/R/lib/libR.so libR.so
I used the command following to build (note the tar.gz file now contains the modified Makefile)
R CMD INSTALL --configure-args="--with-nvcc=/usr/local/cuda/bin/nvcc --with-r-lib=/usr/lib64/" ./gputools_1.0.tar.gz
I know this is ugly, but it seems to work.
It seems that your makefile has a typo
-Wp,-D_FORTIFY_SOURCE=2
Specifically, the comma (',') should be a space (' ') only.
Please try that and report back letting us know what happened

building a mapnik 2.2.0 RPM on RHEL 7

I am trying to build a mapnik 2.2.0 RPM file on my RHEL/CENTOS 7 machine.
so I took the RPM SRC file from Fedora 22 which is mapnik-2.2.0-11.fc21.src.rpm ( I have the same result with mapnik-2.2.0-5.fc20.src.rpm )
when I am running the rpmbuild I receive the following error message:
Welcome to Mapnik...
scons: warning: Ignoring missing SConscript 'deps/agg/build.py'
File "/root/rpmbuild/BUILD/mapnik-v2.2.0/SConstruct", line 1799, in <module>
scons: warning: Ignoring missing SConscript 'deps/mapnik/build.py'
File "/root/rpmbuild/BUILD/mapnik-v2.2.0/SConstruct", line 1808, in <module>
scons: done reading SConscript files.
scons: Building targets ...
g++ -o bindings/python/mapnik_building_symbolizer.os -c -ansi -Wall -pthread -ftemplate-depth-300 -O3 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts -fPIC -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DBIGINT -DBOOST_REGEX_HAS_ICU -DLINUX -DMAPNIK_THREADSAFE -DNDEBUG -DHAVE_CAIRO -DHAVE_PYCAIRO -I. -Iinclude -I/usr/include/polyclipping -I/usr/include/agg2 -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/gdal -I/usr/include/python2.7 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/pycairo bindings/python/mapnik_building_symbolizer.cpp
In file included from include/mapnik/symbolizer.hpp:29:0,
from include/mapnik/building_symbolizer.hpp:29,
from bindings/python/mapnik_building_symbolizer.cpp:26:
include/mapnik/image_compositing.hpp:74:19: error: 'comp_op_grain_merge' is not a member of 'agg'
grain_merge = agg::comp_op_grain_merge,
^
include/mapnik/image_compositing.hpp:75:21: error: 'comp_op_grain_extract' is not a member of 'agg'
grain_extract = agg::comp_op_grain_extract,
^
scons: *** [bindings/python/mapnik_building_symbolizer.os] Error 1
scons: building terminated because of errors.
error: Bad exit status from /var/tmp/rpm-tmp.kuI6KW (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.kuI6KW (%build)
Mapnik normally comes with a heavily patched version of the AGG library right there in its source tree. The Fedora build however disables that in favour of having the Mapnik-AGG patches directly in its own AGG package (because they don't like duplicating system libraries elsewhere).
You either need an AGG library for CentOS that is feature-compatible with the patched Fedora version, or you have to modify your Mapnik build to disable the "system_agg" patch (and drop the "rm -rf boost deps" from the spec file).

github_install & R CMD INSTALL fails for videoplayR

I was trying to install the package videoplayR from github but failed to do the same. I tried two ways:
1. Using the installation guidance mentioned in README file.It gave the following error:
> install_github("sjmgarnier/videoplayR")
Downloading github repo sjmgarnier/videoplayR#master
Error in function (type, msg, asError = TRUE) :
2. Using R CMD SHLIB etc gives the following error while running R CMD check. It is a part of the install.out file:
* installing source package ‘videoplayR’ ...
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/nandy/R/x86_64-pc-linux-gnu-library/3.1/Rcpp/include" -I"/home/nandy/R/x86_64-pc-linux-gnu-library/3.1/RcppArmadillo/include" pkg-config --cflags opencv Rscript -e <p>'Rcpp:::CxxFlags()' -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/nandy/R/x86_64-pc-linux-gnu-library/3.1/Rcpp/include" -I"/home/nandy/R/x86_64-pc-linux-gnu-library/3.1/RcppArmadillo/include" pkg-config --cflags opencv Rscript -e <p>'Rcpp:::CxxFlags()' -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Video.cpp -o Video.o
Video.cpp: In member function ‘double Video::current_frame()’:
Video.cpp:42:25: error: ‘CV_CAP_PROP_POS_FRAMES’ was not declared in this scope
return(inputVideo.get(CV_CAP_PROP_POS_FRAMES));
^
Video.cpp: In member function ‘void Video::set_current_frame(int)’:
Video.cpp:46:18: error: ‘CV_CAP_PROP_POS_FRAMES’ was not declared in this scope
inputVideo.set(CV_CAP_PROP_POS_FRAMES, n);
^
Video.cpp: In member function ‘void Video::next_frame_cv()’:
Video.cpp:63:22: error: ‘CV_CAP_PROP_POS_FRAMES’ was not declared in this scope
if (inputVideo.get(CV_CAP_PROP_POS_FRAMES) == inputVideo.get(CV_CAP_PROP_FRAME_COUNT)) {
^
Video.cpp:63:64: error: ‘CV_CAP_PROP_FRAME_COUNT’ was not declared in this scope
if (inputVideo.get(CV_CAP_PROP_POS_FRAMES) == inputVideo.get(CV_CAP_PROP_FRAME_COUNT)) {
^
Video.cpp: In member function ‘void Video::get_frame_cv(int)’:
Video.cpp:76:27: error: ‘CV_CAP_PROP_FRAME_COUNT’ was not declared in this scope
if (n > inputVideo.get(CV_CAP_PROP_FRAME_COUNT)) {
^
Video.cpp:80:18: error: ‘CV_CAP_PROP_POS_FRAMES’ was not declared in this scope
inputVideo.set(CV_CAP_PROP_POS_FRAMES, n);
^
Video.cpp: In member function ‘int Video::length()’:
Video.cpp:91:25: error: ‘CV_CAP_PROP_FRAME_COUNT’ was not declared in this scope
return(inputVideo.get(CV_CAP_PROP_FRAME_COUNT));
^
I am guessing problem 2 is occurring due to version problem of OpenCV. Am I right? Is there any way out of this?
Looks similar to these 2 reported problems: https://github.com/hadley/devtools/issues/650 and https://github.com/hadley/devtools/issues/467. It seems that you need to update your system (Linux I presume) to the latest version of Curl.
I believe this is my fault. I forgot to exclude the compiled shared object videoplayR.so last time I committed changes to the GitHub repo. If you're using a different OS than mine (OSX Yosemite), it is most certainly the cause of the problem that you encountered. I fixed it and now it should compile nicely on your computer as well.
FYI I compiled and ran the package with both OpenCV 2.4.9 and 2.4.10, but it should work with any 2.4.X version of OpenCV (never tried the latest OpenCV 3.0 beta).

Resources