Building TIC fails (ncurses5.9) for CLFS 3.0.0 SYSTEMD - linux

Recently I decided to retry building a CLFS machine http://www.clfs.org and am at step 5.5 of 3.0.0 SYSTEMD. We are told to run make -C include and then make -C progs tic. I am failing at the last command. Am I missing any packages, or am I doing something wrong?
I am using ArchLinux as my CLFS host in VMWare which is running on Windows 10.
Here is the page I am looking at for the commands: http://clfs.org/files/BOOK/3.0.0/SYSTEMD/view/x86_64/cross-tools/ncurses.html
Here is the output from the console when I run that last command:
In file included from ../ncurses/curses.priv.h:283:0,
from ../ncurses/lib_gen.c:19:_33528.c:835:15: error: expected ')' before 'int'
../include/curses.h:1594:56: note: in definition of macro 'mouse_trafo'
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
^

The error message is pointing to the y symbol,
which could be (mis)defined in some header file on your system.
aside from stray #define's, the only interesting thing about the line is that the prototype for wmouse_trafo uses bool, which the configure script should have (given the compiler version used for CLFS) equated to a c99 _Bool (which should not be a problem).
You can see what the compiler sees by doing
make -C ncurses lib_gen.i
and looking for wmouse_trafo in ncurses/lib_gen.i.
For example, I see it mentioned twice:
extern _Bool wmouse_trafo (const WINDOW*, int*, int*, _Bool);
extern _Bool mouse_trafo (int*, int*, _Bool);
and
_Bool (mouse_trafo) (int * a1, int * a2, _Bool z)
{
; return wmouse_trafo(stdscr,a1,a2,z);
}
The stray semicolon is not a problem, but if there were some problem with the cross-compiler it might make the _Bool missing.
The instructions for CLFS 3.0 use gcc 4.8.3 (versions of all of the parts do matter). However, the error message cited here looks like a recent report due to gcc 5 — which is addressed in ncurses 6.0

Related

How can I compile simpleScalar in cygwin using alpha configuration?

I need to install simplescalar on windows 7. For that reason, I installed cygwin. I need to use simplescalar because I need to do a lab about Benchmarks.
I already installed SimpleScalar on Debian and I compiled it using the alpha configuration without any problem. However, when I try to do the same on windows using cygwin, I'm having issues.
I am trying to compile simplescalar using alpha configuration. since I'm using windows 7, cygwin and I used the following steps:
make config-alpha
make
When I run the make command to compile the simulator, it shows me a lot of errors.
syscall.c: 805:25: error: 'TCP_NODELAY' undeclared here (not in a function); did you mean 'O_NDEALY'?
804 { OSF_TCP_NODELAY, TCP_NODELAY},
O_NDEALY
syscall.c: 805:25: error: 'TCP_MAXSEG' undeclared here (not in a function); did you mean 'TMP_MAX'?
804 { OSF_TCP_MAXSEG, TCP_MAXSEG},
TMP_MAX
syscall.c:2636:56 error: invalid use of undefined type 'struct dirent' i++, cnt < regs -> regs_R[MD_REG_V0] && p->d_reclen > 0;
syscall.c:2637:35 error: invalid use of undefined type 'struct dirent' i++, cnt = p->d_reclen, p=(struct dirent *)(buf+cn 2637)
However, if I use pisa configuration, I can compile the simulator without any problem.
Is there any additional steps I need to do or any additional packages I need to download in cygwin in order to compile simplescala using alpha configuration?
Some of the packages that I have downloaded to do my lab in cygwin have been wget, nano and devel.

Error in file /usr/include/ntirpc/rpc/xdr.h when compiling a program with rpc

I have to compile a c and c++ library with rpc for accessing meeasurement devices, that uses the standrd VXI11, see vxi11-library.
OS: opensuse tumbleweed
Compiler: gcc 12.1.0
After adding the include path -I/usr/include/ntirpc the program at least find the include path (rpc/rpc.h, obviously has been shifted around).
I had to change the name of some functions, but one error remained:
g++ -g -I/usr/include/ntirpc -c vxi11_cmd.cc -o vxi11_cmd.o
In file included from /usr/include/ntirpc/rpc/rpc.h:47,
from vxi11_user.h:31,
from vxi11_cmd.cc:25:
/usr/include/ntirpc/rpc/xdr.h:136:18: error: declaration of ‘vio_type xdr_vio::vio_type’ changes meaning of ‘vio_type’ [-fpermissive]
136 | vio_type vio_type; /* type of buffer */
/usr/include/ntirpc/rpc/xdr.h:126:3: note: ‘vio_type’ declared here as ‘typedef enum vio_type vio_type’
126 | } vio_type;
Anybode can help me, fixing thies error?
Thanks,
Johannes

Boost not finding local installed icu

I am trying to build libboost, 1.70.0.
I've already compiled ICU4C, and installed it locally at my $HOME/usr. I have it build icu-config as well in order to help finding it.
I have $HOME/usr/lib in my LD_LIBRARY_PATH environment variable, and I have $HOME/usr/bin in my PATH.
I am running bootstrap this way:
./bootstrap.sh --with-icu=$HOME/usr/ --prefix=$HOME/usr/
The output suggest that icu will be enabled. And the supplied path is saved in bjam configuration.
Later, when running
./b2 --reconfigure
it says ICU will not be used:
- bzip2 : yes
- lzma : no
- zstd : no
- iconv (libc) : yes
- icu : no
- icu (lib64) : no
- native-atomic-int32-supported : yes
Although not critical, it is interesting it doesn't find lzma, even it being installed locally too.
I am kind of lost, with no idea what I am missing. Recompiled ICU for a couple of times, tried different approaches I found online, and nothing works. Any help is welcome.
Config.log shows,
In file included from /home/ambs/usr/include/unicode/uversion.h:30:0,
from libs/regex/build/has_icu_test.cpp:12:
/home/ambs/usr/include/unicode/umachine.h:340:13: error: char16_t does not name a type
typedef char16_t UChar;
^
In file included from libs/regex/build/has_icu_test.cpp:12:0:
/home/ambs/usr/include/unicode/uversion.h:173:55: error: UChar does not name a type
u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
^
as well as other similar errors. I am (well, I think I am) compiling with the same compiler (that isn't in a standard path, too, but is in my path).
While I am not understanding why bjam is not detecting correctly the compiler, if I use:
./bjam cxxflags='-std=c++11'
then, not just I have icu, as I have C++11 features detected.

__block on Windows in order to compile libdispatch

I am trying to compile (parts of) libdispatch, a.k.a. <dispatch/dispatch.h> on Windows. I tried with MSVC v140, but since the Microsoft compiler doesn't support Blocks, I guess I'm out of luck with MSVC. My plan is to compile with Clang, which integrates into Visual Studio thanks to those LLVM Snapshot Builds: http://llvm.org/builds/
Trying to compile the blocks example from Wikipedia with that Clang for VS compiler
typedef int (^IntBlock)();
IntBlock MakeCounter(int start, int increment) {
__block int i = start;
return Block_copy( ^ {
int ret = i;
i += increment;
return ret;
});
}
fails with the error message:
'__block' undeclared identifier
What's the problem here? I thought, Clang would support blocks?
What can I do to get this to compile?
Have you tried to specify the compiler flag -fblocks?
$ clang a.c -fblocks
I don't know the default settings of Clang Windows binary, but on OS X (the default is -fblocks), with -fno-blocks got the same error.
$ clang -v
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
$ clang a.c -fno-blocks
a.c:3:5: error: use of undeclared identifier '__block'

BUG - ProteaAudio with Lua does not work

Any idea why i cant use or cant build in Lua the ProTeaAudio ?
1) Exist
[root#example ~]# yum install lua-devel
Loaded plugins: presto, refresh-packagekit
Setting up Install Process
Package lua-devel-5.1.4-4.fc12.i686 already installed and latest version
Nothing to do
2) get failed to build the RtAudio
[sun#example proteaAudio_src_090204]$ make
g++ -O2 -Wall -DHAVE_GETTIMEOFDAY -D__LINUX_ALSA__ -Irtaudio -Irtaudio/include -I../lua/src -I../archive/baseCode/include -c rtaudio/RtAudio.cpp -o rtaudio/RtAudio.o
rtaudio/RtAudio.cpp:365: error: no ‘unsigned int RtApi::getStreamSampleRate()’ member function declared in class ‘RtApi’
rtaudio/RtAudio.cpp: In member function ‘virtual bool RtApiAlsa::probeDeviceOpen(unsigned int, RtApi::StreamMode, unsigned int, unsigned int, unsigned int, RtAudioFormat, unsigned int*, RtAudio::StreamOptions*)’:
rtaudio/RtAudio.cpp:5835: error: ‘RTAUDIO_SCHEDULE_REALTIME’ was not declared in this scope
rtaudio/RtAudio.cpp:5837: error: ‘struct RtAudio::StreamOptions’ has no member named ‘priority’
make: *** [rtaudio/RtAudio.o] Error 1
[sun#example proteaAudio_src_090204]$
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require("proAudioRt");
stdin:1: module 'proAudioRt' not found:
no field package.preload['proAudioRt']
no file './proAudioRt.lua'
no file '/usr/share/lua/5.1/proAudioRt.lua'
no file '/usr/share/lua/5.1/proAudioRt/init.lua'
no file '/usr/lib/lua/5.1/proAudioRt.lua'
no file '/usr/lib/lua/5.1/proAudioRt/init.lua'
no file './proAudioRt.so'
no file '/usr/lib/lua/5.1/proAudioRt.so'
no file '/usr/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
Lua is trying to tell you that it cannot find an implementation of the module "proAudioRt" which it tried to find in a variety of places. The first block of places are various attempts at loading an implementation in Lua, then there are a few tries at various shared object files that might have contained the module. Since none of the places work, require fails.
None worked, because you haven't actually built a .so containing the module.
You need to get all of the compile and link errors to clear up so that you build proAudioRt.so. Note that for that to actually contain a Lua module, it must have a C callable entry point named luaopen_proAudioRt(), with the signature
LUALIB_API int luaopen_proAudioRt(lua_State *L);
That function is expected to construct the module's table, supplying it with members containing the functions of the module. The function luaL_register() is handy for this.
The Lua users wiki has a section on binding to Lua that should be helpful as well.

Resources