How to fix errors during the building snowball tool from sources? - installation

I've downloaded sources of https://github.com/snowballstem/snowball and try to build it by official guide on my machine.
Unfortunately, I have gotten an error
make: *** No rule to make target 'install'. Stop.
Steps to reproduce:
$ git clone https://github.com/snowballstem/snowball.git
...
Resolving deltas: 100% (3092/3092), done.
$ make
libstemmer/mkalgorithms.pl algorithms.mk libstemmer/modules.txt
cc -O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations -c -o compiler/space.o compiler/space.c
...
$ sudo make install
make: *** No rule to make target 'install'. Stop.
OS: Ubuntu 22.04
Also I've created an issue here https://github.com/snowballstem/snowball/issues/170
I expect that all instructions from the Snowball guide should work well.

OP's solution migrated from the question to an answer:
After digging deeper, found that running make is enough, and it works well:
echo "running" | ./stemwords -l en
run
Also guide was updated https://snowballstem.org/runtime/use.html

Related

Makefile error while making clean check and install libneo4j-client library

Update: It was my fault, since I do not have the library libcypher-parser installed I should have run ./configure --disable-tools. It works perfectly now :-)
It may be a silly issue, but I have a problem while completing the installation of the C library neo4j-client.
Since I have ArchLinux on my laptop I downloaded the whole repository from https://github.com/cleishm/libneo4j-client and done the following operations:
$ ./autogen.sh
$ ./configure
that completed without any error, leading to the generation of the file Makefile.in
Then I tried
$ make clean check
$ sudo make install
but the results are:
$ make: *** No rule to make target 'clean'. Stop.
$ make: *** No rule to make target 'install'. Stop.
I don't know why both targets are missing from the Makefile, but I'm stuck on this issue.
I tried to look inside Makefile.in, but there are so many targets that I don't know how to recognize the ones I need...
Please help me :-(
Thank you in advance for your time :-)

How can I install lua5.3 for Centos7

Good day,
I really spent almost all after-noon looking to install lua5.3 on Centos 7.
I mostly found information to install Lua5.1 but we really need a version 5.2 or 5.3.
If I found information for 5.3, it was not for Centos.
Until now, the best I could do, is to download the source version from lua web site
enter link description here
But I still can not install it.
Here are my steps, may be you can help to continue
curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz
tar zxf lua-5.3.4.tar.gz
cd lua-5.3.4
make linux test
The problem, from that point how can I install it.
I tried
make
and
make linux
make linux make me a fatal error
[root#pc6 lua-5.3.4]# make linux cd src && make linux make1:
Entering directory /root/install-package/lua-5.3.4/src' make all
SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" make[2]:
Entering directory/root/install-package/lua-5.3.4/src' gcc
-std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c lua.c:82:31: fatal error: readline/readline.h: No such
file or directory #include
^ compilation terminated. make[2]: * [lua.o] Error 1 make[2]: Leaving directory
/root/install-package/lua-5.3.4/src' make[1]: *** [linux] Error 2
make[1]: Leaving directory/root/install-package/lua-5.3.4/src' make:
* [linux] Error 2
So what do you suggest me to do. Centos 7 has been istalled today. May do I miss to install a dependent a library?
Thank for your help
The download page which you mention says:
There are detailed instructions in the package
This link points to the README, which says:
If you're running Linux and get compilation errors, make sure you have installed the readline development package (which is probably named libreadline-dev or readline-devel).
If you don't want to install readline, try make posix or make posix MYCFLAGS=-DLUA_USE_DLOPEN MYLIBS=-ldl instead. You may need to do make clean first.
If you are feeling lazy, the IUS repo has prebuilt packages of lua5.3 for el7 under the name lua53u (u presumably stands for "update") (and lua53u-devel, etc, depending on what you need).
Simply enable the repo and then install:
# enable repos
yum install -y epel-release https://repo.ius.io/ius-release-el7.rpm
# install
yum install -y lua53u

Compiling a library (redland) in Cygwin using gcc and using the output in Visual Studio (c++)

I'm currently trying to compile redland (librdf http://librdf.org/) under Windows. According to their website it should build under Windows. As i don't want to spend my time fixing the .sln I thought about compiling librdf (and the necessary projects) in cygwin and then use the library in visual studio.
So my question is:
Is it possible to use librarys compile in cygwin in windows application? And if so how?
As I am a windows developer I don't know if there is any difference from the created .a files to .dlls. I already read up to the topic and it will be necessary to include the cygwin1.dll in the project but this won't be a problem.
Or does anyone have any better idea how I can get redland compiled as windows dlls?
I thought about using mingw but until now I didn't manage to compile it.
Any help will be appreciated.
Thanks
Update:
Thanks to the help of Yaakov (And his pretty cool cygwin ports) I meanwhile managed to compile raptor (which is a prerequisite for librdf).
All I had to do was include another argument for configure: --with-xml2-config=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/xml2-config
Now I'm trying to compile rasqal which is another requesite and is also depending on raptor2.
For it to work I had to export PKG_CONFIG_PATH="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/" for pkg-config to find the correct raptor installation.
So configure for rasqal worked but when I try to make it I get the following error:
Making all in src
make[1]: Entering directory `/home/Stefan/workspace/rasqal/src'
make all-am
make[2]: Entering directory `/home/Stefan/workspace/rasqal/src'
/bin/sh ../libtool --tag=CC --mode=compile x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -DRASQAL_INTERNAL=1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/raptor2 -g -O2 -DMTWIST_CONFIG -I../libmtwist -g -O2 -MT rasqal_algebra.lo -MD -MP -MF .deps/rasqal_algebra.Tpo -c -o rasqal_algebra.lo rasqal_algebra.c
libtool: compile: x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -DRASQAL_INTERNAL=1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/raptor2 -g -O2 -DMTWIST_CONFIG -I../libmtwist -g -O2 -MT rasqal_algebra.lo -MD -MP -MF .deps/rasqal_algebra.Tpo -c rasqal_algebra.c -DDLL_EXPORT -DPIC -o .libs/rasqal_algebra.o
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/time.h:10:0,
from rasqal.h:116,
from rasqal_algebra.c:39:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/time.h:260:8: error: redefinition of 'struct timezone'
./win32_rasqal_config.h:62:8: note: originally defined here
Makefile:1045: recipe for target `rasqal_algebra.lo' failed
make[2]: *** [rasqal_algebra.lo] Error 1
make[2]: Leaving directory `/home/Stefan/workspace/rasqal/src'
Makefile:720: recipe for target `all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/Stefan/workspace/rasqal/src'
Makefile:484: recipe for target `all-recursive' failed
make: *** [all-recursive] Error 1
Which I can't get my head around I'm not really into cross compiling.
Can someone point me into the right direction?
The MSVC and Cygwin runtimes are incompatible, so you cannot use a Cygwin-compiled binary within VS. However, you can use Cygwin to cross-compile a library for Windows, which for C libraries, should be compatible with VS. (C++ is very compiler-specific, particularly with symbol mangling, but IIRC these libraries are all in C.)
To get started, you need to install the mingw64-i686-gcc-core, mingw64-i686-headers, and mingw64-i686-runtime packages, plus all dependencies, via Cygwin's setup.exe installer. Then, beginning with the "bottom" of the dependency chain, build each library with e.g.:
./configure --prefix=/usr/i686-w64-mingw32/sys-root/mingw --host=i686-w64-mingw32
Then run make followed by make install. For Windows x64, substitute all the i686s above with x86_64.
Keep in mind that librdf has a lot of (sub)dependencies, but I don't remember now how many are optional. Some, but not all, of these are available from the Cygwin Ports repository; those should at least help you get started.
I recommend you to build raptor2 using Visual Studio.
I did this successfully for Visual Studio 2017 x64 this way:
Install libxml2 and libxslt
Open PowerShell:
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg install libxml2:x64-windows
.\vcpkg install libxslt:x64-windows
Build raptor2
Download raptor: http://librdf.org/raptor/ (http://download.librdf.org/source/raptor2-2.0.15.tar.gz)
Change raptor2-2.015/CMakeLists.txt, line 258:
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
->
ADD_DEFINITIONS(-DHAVE_CONFIG_H -DYY_NO_UNISTD_H)
change raptor2-2.015/src/CMakeLists.txt, line 118:
ADD_LIBRARY(raptor2
raptor_avltree.c
...
->
ADD_LIBRARY(raptor2
raptor_escaped.c
sort_r.c
raptor_ntriples.c
raptor_avltree.c
...
open cmake:
set LIBXML2_INCLUDE_DIR to: path/to/vcpkg/installed/x64-windows/include
set LIBXML2_LIBRARIES to: path/to/vcpkg/installed/x64-windows/lib/libxml2.lib
set LIBXSLT_INCLUDE_DIR to: path/to/vcpkg/installed/x64-windows/include
set LIBXSLT_LIBRARIES to: path/to/vcpkg/installed/x64-windows/lib/libxlst.lib
set LIBXSLT_EXSLT_LIBRARY to: path/to/vcpkg/installed/x64-windows/lib/libexlst.lib
Deployment:
Set CMAKE_INSTALL_PREFIX to your deplyoment path e.g. C:\thirdparty\vs2017\x64\raptor2
Execute the INSTALL target in Visual Studio.
If you do not like to execute this steps manually you can just download a prebuild version here.

Makefile error on windows

I am trying to run makefile on windows7. I have added make.exe in windows path variable and
I am trying to run "make -f makefile.txt" but it shows error
"cc -o edit main.o kbd.o command.o display.o insert.o search.o files.o utils.o
process_begin: CreateProcess(NULL, cc -o edit main.o kbd.o command.o display.o i
nsert.o search.o files.o utils.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [edit] Error"
Please help me as i am new to make concept.
It is not sufficient to just add make.exe to the path. Your problem is that cc can not be found while trying to make the target called edit. Try running the same command from an MinGW/MSYS or CygWin shell, depending on how you installed this. That will most likely give you the proper environment to use make with this makefile.
This issue is similar to copy a file using a makefile at runtime
To make it work install MinGW (mingw-get-setup.exe) which will install mingw-get.exe utility that could be used to install all needed build tools.
With C:\Mingw\bin (or whatever path selected during installation) on $PATH type in console:
$ mingw-get.exe gcc g++ msys-base
After it finishes MSYS env will be available with all necessary tools (execute C:\MinGW\msys\1.0\msys.bat to open it)
Now you can use make like in unix envs.
Mike#Mike-PC ~
$ make
make: *** No targets specified and no makefile found. Stop.
If it is not enough install mingw32-make as well with mingw-get.
For some things on windows you'll want to install coreutils. I had this issue for nordic nrf micro issues with make but it's the same error
http://gnuwin32.sourceforge.net/packages/coreutils.htm
Landed here on a re-install of windows scratching head. This was the fix as it adds a bunch of useful commands to windows. Like why did "ls" work on my old drive and not the new one... answer core-utils. Why does it build everywhere and not here -- core-utils. Hope this helps someone in another 8 years.

Error 1 & 2 when compiling GCC 4.4.2 on OpenSolaris 2009.06

My problem:
I've been trying to compile, build, and install GCC 4.4.2 in my installation of OpenSolaris 2009.06 on my VirtualBox 3 i386 machine. But I keep getting this same error when running make:
> checking whether ln -s works... yes
checking for i386-pc-solaris2.11-gcc... /src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/xgcc -B/src/gcc-4.4.2/host-i386-pc-solaris2.11/gcc/ -B/usr/gnu/i386-pc-solaris2.11/bin/ -B/usr/gnu/i386-pc-solaris2.11/lib/ -isystem /usr/gnu/i386-pc-solaris2.11/include -isystem /usr/gnu/i386-pc-solaris2.11/sys-include
checking for suffix of object files... configure: error: in `/src/gcc-4.4.2/i386-pc-solaris2.11/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/src/gcc-4.4.2'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/src/gcc-4.4.2'
make: *** [all] Error 2
Attempted solutions:
I tried the answer to this question:
Problem compiling gcc 4.4.0 on OpenSolaris 2009.6 i.e.
./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas --with-gnu-as --with-gnu-ld
I tried GNU GCC's platform specific solution:
GNU Solaris specific build instructions
i.e.
./configure --prefix=/usr/gnu --with-gmp=/usr/gnu --with-mpfr=/usr/gnu --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared
I am still getting the same errors despite running ./configure with the two solutions above
Any help would be appreciated!
Thanks!
Can you compile programs with the existing GCC?
If not, you need to resolve that.
If you can, then you need to look at that monstrous 7-argument command (the one where it says 'checking for i386-pc-solaris2.11-gcc' - why those 7 arguments?).
Are you running 'make bootstrap'?
If not, what happens when you do?
If so, whereabouts in the processing is it? (Is this stage 1, or stage 2, or what?)
Are you using the recommended setup, with the source for GCC in, say, /src/gcc-4.4.2 and the object files in, say, /src/gcc-4.4.2-obj?
If not, do so. Use: cd /src/gcc-4.4.2-obj; ../gcc-4.4.2/configure ...
Which shell do you use?
On regular Solaris 10 (not OpenSolaris - and SPARC, not Intel), I have to set CONFIG_SHELL=/bin/ksh in the environment to make things compile (by default, it uses /bin/sh, but the /bin/sh on Solaris 10 is Bourne shell and there's a script deep down in the Java section (IIRC) that uses Bash/Korn/POSIX shell notations like $(cmd ...)). However, that normally affects a much later stage in the processing.
However, I have got GCC 4.4.2 on Solaris 10 without problem (using GCC 4.4.1 as the bootstrap compiler).

Resources