Building lrzip-next on cygwin on Windows 11 - windows

I've been trying to build lrzip-next on cygwin on Windows 11 but I couldn't succeed.
I end up with this error:
Making install in src
make[1]: ingresso nella directory «/cygdrive/c/Users/giova/Downloads/lrzip-next-0.10.0/src»
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I.. -I . -I .. -I ../src/include -I ../src/lzma/include -g -O2 -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.c &&\
mv -f $depbase.Tpo $depbase.Po
main.c: In function ‘main’:
main.c:351:20: warning: ‘optind’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
351 | extern int optind;
| ^~~~~~
main.c:505:49: error: ‘PRIO_MIN’ undeclared (first use in this function)
505 | if (control->nice_val < PRIO_MIN || control->nice_val > PRIO_MAX)
| ^~~~~~~~
main.c:505:49: note: each undeclared identifier is reported only once for each function it appears in
main.c:505:81: error: ‘PRIO_MAX’ undeclared (first use in this function); did you mean ‘PRIoMAX’?
505 | if (control->nice_val < PRIO_MIN || control->nice_val > PRIO_MAX)
| ^~~~~~~~
| PRIoMAX
make[1]: *** [Makefile:551: main.o] Error 1
make[1]: uscita dalla directory «/cygdrive/c/Users/giova/Downloads/lrzip-next-0.10.0/src»
make: *** [Makefile:502: install-recursive] Error 1
I'm on Windows 11 22H2
I'm using cygwin version (uname -a output) CYGWIN_NT-10.0-22621 DellXPS15 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin
I've tried asking for suggestion on the github issue page but I was told windows is not a supported platform, but since cygwin should enable software such as this to run (and in fact the normal lrzip version is actually included in cygwin's repo) I was wonder whether there was anything I could do to make it run on this platform.
Does anyone have any suggestion?
Here is the full build log.

Related

cross-compile iperf from x86_64 for ARM64 target

I want to cross compile iperf-2.0.5 from my x86_64 ubuntu linux machine for a ARM64 target. Therefore I installed the cross compiler:
sudo apt install gcc make gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-aarch64-linux-gnu
then I tried to configure:
./configure --build=aarch64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --enable-static --disable-shared
which gives me this warning: configure: WARNING: unrecognized options: --enable-static, --disable-shared
apart from this warning i'm not getting any errors but I'm not sure how to verify that the build and host parameters are selected correctly.
When I run make I get the following error.
make all-recursive
make[1]: Entering directory '/home/recherma/Documents/iperf-2.0.5'
Making all in compat
make[2]: Entering directory '/home/recherma/Documents/iperf-2.0.5/compat'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -Wall -O2 -MT delay.o -MD -MP -MF ".deps/delay.Tpo" -c -o delay.o delay.cpp; \
then mv -f ".deps/delay.Tpo" ".deps/delay.Po"; else rm -f ".deps/delay.Tpo"; exit 1; fi
In file included from /usr/include/c++/9/stdlib.h:36,
from ../include/headers.h:78,
from ../include/Timestamp.hpp:63,
from delay.cpp:53:
/usr/include/c++/9/cstdlib:151:11: error: ‘::malloc’ has not been declared
151 | using ::malloc;
| ^~~~~~
In file included from ../include/headers.h:78,
from ../include/Timestamp.hpp:63,
from delay.cpp:53:
/usr/include/c++/9/stdlib.h:65:12: error: ‘std::malloc’ has not been declared
65 | using std::malloc;
| ^~~~~~
In file included from /usr/include/c++/9/cmath:42,
from /usr/include/c++/9/math.h:36,
from ../include/headers.h:85,
from ../include/Timestamp.hpp:63,
from delay.cpp:53:
/usr/include/c++/9/bits/cpp_type_traits.h:214:12: error: redefinition of ‘struct std::__is_integer<int>’
214 | struct __is_integer<int>
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/cpp_type_traits.h:138:12: note: previous definition of ‘struct std::__is_integer<int>’
138 | struct __is_integer<bool>
| ^~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:273: delay.o] Error 1
make[2]: Leaving directory '/home/recherma/Documents/iperf-2.0.5/compat'
make[1]: *** [Makefile:252: all-recursive] Error 1
make[1]: Leaving directory '/home/recherma/Documents/iperf-2.0.5'
make: *** [Makefile:190: all] Error 2
So I guess the configuration failed. Does anyone know now to configure it correctly?
EDIT:
I think --host should be changed to aarch64-unknown-linux-gnu. But this changes nothing and I get the exact same errors.
Try removing DAST_CHECK_BOOL from configure.ac and try reconfigure again.
If that didn't help, after configure, comment #define bool int in config.h and try rebuild.

Problem installing ndless-sdk: error building genzehn

I am trying to install Ndless sdk on my Windows computer (with CygWin). I run
.../Ndless/ndless-sdk/toolchain/build_toolchain.sh
and I fixed all the problems with that. After that, according to the instructions, I went in the (top) Ndless directory and ran "make". It got stuck at this point and whatever I did, I could not get it to compile "genzehn"
.../Ndless/ndless-sdk/tools/genzehn/genzehn.cpp
What should I do?
The log(both stdout and stderr for make in "Ndless"):
https://pastebin.com/fpH6Mf2v
make all in genzehn...
make[3]: Entering directory '/Ndless/ndless-sdk/tools/genzehn'
g++ -Wall -Wextra -std=c++11 -I elfio-3.2 genzehn.cpp -lboost_program_options -lz -o ../../bin/genzehn || g++ -Wall -Wextra -std=c++11 -I elfio-3.2 genzehn.cpp -lboost_program_options-mt -lz -o ../../bin/genzehn
In file included from genzehn.cpp:12:
zehn.h:1:1: error: expected unqualified-id before ‘.’ token
1 | ../../include/zehn.h
| ^
genzehn.cpp: In function ‘int main(int, char**)’:
genzehn.cpp:96:9: error: ‘Zehn_header’ was not declared in this scope; did you mean ‘gz_header’?
96 | Zehn_header header;
| ^~~~~~~~~~~
| gz_header

LibPNG building issue on Windows 10

Im trying to build libpng on Windows 10 to get win32 binaries but having an issue related, i supposed, to awk parsing files with CRLF line endings. I've tried to convert files with dos2unix command, but without success, result the same - on the make command I've getting next output:
sh-3.1$ make
rm -f pnglibconf.c pnglibconf.tf[45]
gawk -f ./scripts/options.awk out=pnglibconf.tf4 version=search\
./pngconf.h ./scripts/pnglibconf.dfa\
./pngusr.dfa 1>&2
gawk -f ./scripts/options.awk out=pnglibconf.tf5 pnglibconf.tf4 1>&2
options.awk: bad line (10): com
make: *** [pnglibconf.c] Error 1
Compiler is MinGW with MSYS v1.0 on WIndows 10 x86, libpng version is 1637. How to solve this issue?
Update: solved by downloading tar.gz archive, but having new issue
sh-3.1$ make make all-am make[1]: Entering directory `/c/Users/user/Downloads/libpng-1.6.37.tar/libpng-1.6.37' depbase=`echo contrib/tools/pngfix.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ gcc -DHAVE_CONFIG_H -I. -g -O2 -MT contrib/tools/pngfix.o -MD -MP -MF $depbase.Tpo -c -o contrib/tools/pngfix.o contrib/tools/pngfix.c &&\ mv -f $depbase.Tpo $depbase.Po In file included from contrib/tools/../../png.h:330,
from contrib/tools/pngfix.c:44:
contrib/tools/../../pnglibconf.h:206:54: error: expected identifier or '(' before '-' token
#define PNG_TEXT_Z_DEFAULT_STRATEGY 0
^
In file included from contrib/tools/../../png.h:335,
from contrib/tools/pngfix.c:44:
contrib/tools/../../pngconf.h:524:9: error: unknown type name 'ptrdiff_t'
typedef ptrdiff_t png_ptrdiff_t;
^~~~~~~~~
make[1]: *** [contrib/tools/pngfix.o] Error 1 make[1]: Leaving directory `/c/Users/user/Downloads/libpng-1.6.37.tar/libpng-1.6.37' make: *** [all] Error 2
It has been experimentally verified that this problem does not occur on Linux.
The solution for me was to change the line breaks on scripts/pnglibconf.dfa from CRLF to LF.
Solved. Summary: use tar.gz or xz archive with unix LF, and edit pnglibconf.h generated during compilation so there is no line breaks.

Yocto project cannot find asm/errno.h

I'm trying to compile a program that requires asm/errno.h header.
Building C object CMakeFiles/modem.dir/src/client.c.o
| /home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc -Dmodem_EXPORTS -std=gnu99 -march=armv7-a -mfloat-abi=softfp -mfpu=neon --sysroot=/home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/mdm9607 -O2 -fexpensive-optimizations -frename-registers -fomit-frame-pointer -fPIC -I/home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/src -I/home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/include -o CMakeFiles/modem.dir/src/client.c.o -c /home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/src/client.c
| [ 83%] /home/kristupas/yocto/oe-core/build/tmp-glibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libmodem/1.0-r0/libmodem/src/client.c:14:25: fatal error: asm/ernno.h: No such file or directory
| #include <asm/ernno.h>
^
The --sysroot argument is set correctly to my targets sysroot, but gcc still can't find the header, even though it's clearly there:
ls -la /home/kristupas/yocto/oe-core/tmp-glibc/sysroots/mdm9607/usr/include/asm/ | grep "errno\.h"
-rw-r--r-- 3 kristupas kristupas 31 Kov 9 16:06 errno.h
Doing
echo | /home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/arm-oe-linux-gnueabi/arm-oe-linux-gnueabi-gcc -R -Wp. -v -
returns this:
--includedir=/home/kristupas/yocto/oe-core/build/tmp-glibc/sysroots/x86_64-linux/usr/include
This is the include directory for the host, which does not contain asm/errno.h. Shouldn't it point to targets sysroot instead?
Turns out I misspelled errno and failed to notice it for hours!

rlwrap mac os x install error

I am trying to install RLWrap into my mac os x (Snow Leopard), I have XCode and am able to run the ./configure command sucessfuly, however when I try the make command I get the following error:
make all-recursive Making all in doc make[2]: Nothing to be done for
`all'. Making all in src gcc -DHAVE_CONFIG_H -I. -I..
-DDATADIR=\"/usr/local/share\" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c main.c: In function
‘read_options_and_command_name’: main.c:775: error:
‘rl_basic_quote_characters’ undeclared (first use in this function)
main.c:775: error: (Each undeclared identifier is reported only once
main.c:775: error: for each function it appears in.) make[2]: *
[main.o] Error 1 make[1]: [all-recursive] Error 1 make: ** [all]
Error 2
Anyone have any ideas of the cause of this?
It looks as though there's a bogus libreadline on OS X:
oldhost:rlwrap-0.37 boxcat$ ls -l /usr/lib/libreadline.dylib
lrwxr-xr-x 1 root wheel 15 16 Mar 14:25 /usr/lib/libreadline.dylib -> libedit.3.dylib
oldhost:rlwrap-0.37 boxcat$
I think you'll need a genuine libreadline (i.e. the GNU version) installed first.

Resources