Problem installing ndless-sdk: error building genzehn - windows

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

Related

Building lrzip-next on cygwin on Windows 11

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.

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.

Building zookeeper 3.4.12 c client on solaris machine fails with libtool error

I am trying to build zookeeper 3.4.12 c client on the Solaris machine. Below are the steps that I followed,
unzip/untar the source tarball and cd to the zookeeper-x.x.x/src/c
directory.
Do a "./configure [OPTIONS]" to generate the makefile.
./configure --without-cppunit
This step fails with below error,
/bin/sh ./libtool --tag=CC --mode=link gcc -Wall -Werror -g -O2
-D_GNU_SOURCE -no-undefined -version-info 2 -lnsl -lsocket -export-symbols-regex '(zoo_|zookeeper_|zhandle|Z|format_log_message|log_message|logLevel|deallocate_|allocate_|zerror|is_unrecoverable)'
-o libzookeeper_st.la -rpath /usr/local/lib libzkst.la libhashtable.la libtool: link: /bin/nm -p ./.libs/libzkst.a ./.libs/libhashtable.a | | /bin/gsed 's/.* //' | sort | uniq > .libs/libzookeeper_st.exp ./libtool[1732]: eval: syntax error at line 1: `|' unexpected
*** Error code 3 make: Fatal error: Command failed for target `libzookeeper_st.la'
Any idea on the error?
Regards,
Ashwini.
The error is because you're missing a command in this portion of the command line:
... ./.libs/libzkst.a ./.libs/libhashtable.a | | /bin/gsed 's/.* //' ...
If you can find that recipe in the Makefile, there's probably a $(something) there that's expanded to an empty string, thus attempting a null command in the pipeline.
Found the issue. There was something like this in make file :
"libzookeeper_st.la: $(libzookeeper_st_la_OBJECTS) $(libzookeeper_st_la_DEPENDENCIES) $(AM_V_CCLD)$(libzookeeper_st_la_LINK) -rpath $(libdir)".
Where in if I remove -rpath $(libdir) everything builds properly.
Dont know what -rpath $(libdir) does. -rpath $(libdir) expands to "-rpath /usr/local/lib". But this resolves the issue.

.code16gcc not supported yet (Mac)

I want to make for the university a bootloader. For this I have an example .c file and normally it should works. BUT on my Mac I get every time the error message:
My-MacBook-Air:src me$ make start
rm -f *.bin *.img *.elf *~ *.o *.s
gcc -m32 -c -g -Os -march=i686 -ffreestanding -Wall -Werror -I. -o os.o os.c
<inline asm>:1:1: error: unexpected directive .code16gcc
.code16gcc
^
<inline asm>:1:11: error: .code16gcc not supported yet
.code16gcc
^
2 errors generated.
make: *** [all] Error 1
Have anyone the same problem and have solved it?
It would be really great!!!!!!!
P.S.: gcc is installed

How to run "gmake install"?

I am now installing a code on my mac.
The code is from here. Look for "Benchmark and Boundary Detection Code" in this page.
In the readme file, it says:
(1) For the image and segmentation reading routines in the Dataset
directory to work, make sure you edit Dataset/bsdsRoot.m to point to
your local copy of the BSDS dataset.
(2) Run 'gmake install' from this directory to build everything. You
should then probably put the lib/matlab directory in your MATLAB path.
(3) Read the Benchmark/README file.
For the 1st step, I did as suggested.
For the 2nd step, I am pretty confused. I ran command gmake install in MATLAB, however, I got:
gmake
Undefined function or variable 'gmake'.
Actually, before running MATLAB, I installed gmake port through macports.
I just did it in terminal, however, this is what I got...
hou229:segbench yaozhongsong$ cd /Users/yaozhongsong/Documents/MATLAB/segbench
hou229:segbench yaozhongsong$ sudo gmake install
gmake[1]: execvp: ../Util/gethosttype: Permission denied
gmake[1]: Entering directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
GNUmakefile-library:26: *** mexSuffix not defined. Stop.
gmake[1]: Leaving directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
hou229:segbench yaozhongsong$
In MATLAB, I also did like this:
!gmake install
/bin/bash: gmake: command not found
How to do the 2nd step in readme file?
Thanks in advance!
#Amro
hou229:segbench yaozhongsong$ cd /Users/yaozhongsong/Documents/MATLAB/segbench
hou229:segbench yaozhongsong$ sudo gmake install
Password:
gmake[1]: execvp: ../Util/gethosttype: Permission denied
gmake[1]: Entering directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
mkdir -p ../lib/matlab
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Exception.cc -o build//Exception.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c String.cc -o build//String.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Random.cc -o build//Random.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Timer.cc -o build//Timer.o
g++ -g -Wall -fPIC -I../include -O3 -DNOBLAS -c Matrix.cc -o build//Matrix.o
Matrix.cc:13:21: error: ieee754.h: No such file or directory
Matrix.cc: In function ‘double nextpow2(double)’:
Matrix.cc:86: error: ‘ieee754_double’ was not declared in this scope
Matrix.cc:86: error: expected `;' before ‘val’
Matrix.cc:87: error: ‘val’ was not declared in this scope
Matrix.cc:88: error: ‘IEEE754_DOUBLE_BIAS’ was not declared in this scope
Matrix.cc: At global scope:
Matrix.cc:48: warning: ‘snan’ defined but not used
Matrix.cc:49: warning: ‘inf’ defined but not used
gmake[1]: *** [build//Matrix.o] Error 1
gmake[1]: Leaving directory `/Users/yaozhongsong/Documents/MATLAB/segbench/Util'
For the "mexSuffix not defined" error, first run mexext inside MATLAB, take that output (I suspect it is mexmaci64), edit the file Util/GNUmakefile-library and add the following at line 24:
mexSuffix := mexmaci64
replace the value with the one you get from mexext
Note: I haven't tested any of this, I am on a Windows machine..
You need to run gmake from the Terminal (command line), not in MATLAB.

Resources