How to tell automake to find my version of aclocal when recompiling hunspell? - automake

I am currently recompiling hunspell from the git source downloaded from fedora as follows:
git://pkgs.fedoraproject.org/hunspell.git
As mentioned by the steps in HACKING, I installed all prerequisite and execute the build commands:
autoconf && ./configure && make
And I received this error message:
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.13 -I m4
/bin/bash: aclocal-1.13:命令找不到 (command not found)
Makefile:463: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127
My computer has automake 1.14 installed.
tom#bktkowks04:~/Development/hunspell$ aclocal --version
aclocal (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey#redhat.com>
and Alexandre Duret-Lutz <adl#gnu.org>.
tom#bktkowks04:~/Development/hunspell$ which aclocal
/usr/bin/aclocal
tom#bktkowks04:~/Development/hunspell$
Which the offending statement happends when the system is "make"ing. Is there anyway for me to tell make to locate my aclocal? I tried to trace the steps when making. Shall I post the steps listed?
Thanks all.

Related

gcc failed with exit status 1 (limits.h doesn't exist error) while installing textract Python3 macOs

I am trying to use textract on Python3 on MacOS.
`pip install textract`
fails with error as following:
#include_next <limits.h> /* recurse down to the real one */
^
compilation terminated.
error: command 'gcc' failed with exit status 1
which gcc
/usr/local/bin/gcc
gcc --version
gcc (Homebrew GCC 4.9.4_1) 4.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I tried to use default gcc compiler after updating through xcode v4.2.0 /usr/bin/gcc but it failed with very similar error: gcc failed with status 1: al.h not found
I've also tried installing gcc from anaconda but that failed with the same error limits.h doesn't exist.
Appreciate your help!
P.S. my ultimate goal is to extract text from Pdf. I tried with PdfMiner.six and PyPdf2 but both of these fail to properly handle spaces. They either remove all whitespaces, concatenating all words or add strange whitespaces.

Compiling autoconf results in an incorrect version reporting

I want to update from autoconf 2.62 to 2.69.
I downloaded the source and ran the following:
./configure
make
make install
These all complete successfully.
When I run autoconf --version I get the following:
autoconf --version
autoconf (GNU Autoconf) ?K??
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
The problem you see here is that the version reports as ?K??.
Why could this be? My machine runs in the EBCDIC codepage and I am wondering if this could be associated. Is there a configure / make option I need to add.
This issues stops me compiling other software, as the configure scripts check the version autoconf reports and it ends up failing those checks.
-----UPDATE-------
I have run make check as requested and this is the output:
autoconf269: >make check
make check-recursive
Making check in bin
Making check in .
Making check in lib
Making check in Autom4te
Making check in m4sugar
make check-local
Making check in autoconf
make check-local
Making check in autotest
make check-local
Making check in autoscan
Making check in emacs
Making check in doc
make: Makefile: line 436: Warning -- FSUM9433 Duplicate entry [fdl.texi] in prerequisite list
Making check in tests
make check-local
cd ../lib/autotest && make autotest.m4f
`autotest.m4f' is up to date
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg' ../bin/autom4te -B '..'/lib -B '..'/lib --language=autotest -I . -I . suite.at -o ./testsuite.tmp
m4:local.at:18: bad expression in eval (bad input): ((?+1+0) > (2+0)) - ((?+1+0) < (2+0))
autom4te: /workarea/tools/m4/bin/m4 failed with exit status: 1
FSUM8226 make: Error code 1
FSUM8226 make: Error code 255
FSUM8226 make: Error code 1
FSUM8226 make: Error code 255
My eyes are drawn to : m4:local.at:18: bad expression in eval (bad input): ((?+1+0) > (2+0)) - ((?+1+0) < (2+0)) -- any ideas why this may be considered a bad expression?
One possiblity: the autoconf you compiled installed into /usr/local while the preinstalled one is in /usr. /usr is first in PATH so the preinstalled one is used.
You can also check the version before running make install to ensure, that the new verson fixes your problem.

Directory change error with mingw32-make

I'm building POCO library 1.6.0 under MinGW32, environment: Windows 7 Ultimate 32-bit, shell: MSYS. Successfully executed ./configure.
$ ./configure
Configured for MinGW
Contents of config.make:
POCO_CONFIG = MinGW
POCO_BASE = /c/dev/poco
POCO_BUILD = /c/dev/poco
POCO_PREFIX = /usr/local
POCO_FLAGS =
OMIT =
export POCO_CONFIG
export POCO_BASE
export POCO_BUILD
export POCO_PREFIX
export POCO_FLAGS
After launching mingw32-make I'm getting:
$ mingw32-make --debug -w
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
File `poco' does not exist.
File `libexecs' does not exist.
File `Foundation-libexec' does not exist.
Must remake target `Foundation-libexec'.
Invoking recipe from Makefile:69 to update target `Foundation-libexec'.
mingw32-make: Entering directory `c:/dev/poco'
C:/app/MinGW/bin/mingw32-make -d -C /c/dev/poco/Foundation
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
mingw32-make: Entering an unknown directory
mingw32-make: *** /c/dev/poco/Foundation: No such file or directory. Stop.
mingw32-make: Leaving an unknown directory
mingw32-make: *** [Foundation-libexec] Error 2
mingw32-make: Leaving directory `c:/dev/poco'
The problem is in
mingw32-make: Entering an unknown directory
mingw32-make: *** /c/dev/poco/Foundation: No such file or directory. Stop.
because /c/dev/poco/Foundation does exist:
$ ls
CHANGELOG LICENSE VERSION build_vs110.cmd config.make
CMakeLists.txt MANIFEST XML build_vs120.cmd configure
CONTRIBUTORS Makefile build build_vs90.cmd contrib
CppUnit NEWS build_CE_vs90.cmd buildwin.cmd doc
DLLVersion.rc Net build_vcexpress2008.cmd cmake libversion
Foundation README build_vcexpress2010.cmd components patches
JSON Util build_vs100.cmd config.build
I was modifying makefile to change directory to other sub-folders, no joy. It seems like something prevents mingw32-make from changing directory. Also can confirm that
cd /c/dev/poco/Foundation
works fine.
Tried with make, result is the same:
$ make --debug -w
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
File `poco' does not exist.
File `libexecs' does not exist.
File `Foundation-libexec' does not exist.
Must remake target `Foundation-libexec'.
Invoking recipe from Makefile:69 to update target `Foundation-libexec'.
make: Entering directory `c:/dev/poco'
C:/app/MinGW/msys/1.0/bin/make -d -C /c/dev/poco/Foundation
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
make: Entering an unknown directory
make: *** /c/dev/poco/Foundation: No such file or directory. Stop.
make: Leaving an unknown directory
make: *** [Foundation-libexec] Error 2
make: Leaving directory `c:/dev/poco'
There are no obvious reasons for mingw32-make to fail as path does not have spaces.
What I have missed? Any suggestions welcome.
The path /c/dev/poco/Foundation does not mean what you seem to think, in the context of mingw32-make.exe. See, mingw32-make.exe is a native Windows application, so it definitely will not understand an MSYS specific path such as /c/dev/poco/Foundation; rather, it will interpret it "as is", as c:/c/dev/poco/Foundation, (assuming your current working drive is c:), which I'm sure is not what you intended.
You do seem to be using MSYS as your shell, so why are you using mingw32-make.exe anyway? Use the make.exe that MSYS itself provides; it does understand MSYS paths.
Do note that, if you run make --version from the MSYS shell, you should see, (at this time of writing):
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
In your updated question, you show an example of running make.exe, which clearly is not this MSYS version; it appears that you have placed an alternative version of make.exe -- perhaps even a copy of mingw32-make.exe itself, for the output is identical -- in some directory which precedes the MSYS version in your $PATH. You should delete this non-MSYS version of make.exe; the entire purpose in calling the MinGW version mingw32-make.exe is to avoid this very conflict. When you run make from the MSYS shell, you want the MSYS version, and not some mingw32-make.exe clone.

The syntax of the command is incorrect while compiling Clang with GCC-4.9.1_x64

After coming across some problems regarding cmake and gcc-4.9.1 on windows system, and spending more than 2 hours of building llvm with clang I got a really nice error that I can't seem to find information on. I've done everything according to documentation and here's the story-teller error message that make gives me:
Scanning dependencies of target LTO_exports
[ 69%] Creating export file for LTO
The syntax of the command is incorrect.
make[2]: *** [tools/lto/LTO.def] Error 1
make[1]: *** [tools/lto/CMakeFiles/LTO_exports.dir/all] Error 2
make: *** [all] Error 2
That is all to it, no other detail available at all. I've checked the LTO.def file since it references that. The file contains one single entry: "EXPORTS[CR][LF]". The LTO_exports.dir/all contains the following files:
build.make
cmake_clean.cmake
depend.internal
depend.make
DependInfo.cmake
progress.make
I haven't touched these files at all. I used the following cmake command before actually using make.
C:\LLVM_Binaries>cmake -G"MinGW Makefiles" -DCMAKE_C_COMPILER="C:/MinGW/bin/gcc.exe" -DCMAKE_CXX_COMPILER="C:/MinGW/bin/g++.exe" -DCMAKE_MAKE_PROGRAM="C:/MinGW/bin/make.exe" -DCMAKE_BUILD_TYPE=Release ..\LLVM
Also here're the details of gcc g++ and make:
gcc --version
gcc (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
g++ --version
g++ (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
make -v
GNU Make 3.82
Built for x86_64-w64-mingw32
This program is built by Equation Solution <http://www.Equation.com>
for Windows.
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Anyone else experienced this problem and managed to build llvm with clang on 64bit Windows operating system?
#Edit (output of make VERBOSE=1)
Scanning dependencies of target LTO_exports
make[2]: Leaving directory `C:/LLVM_Binaries'
make -f tools\lto\CMakeFiles\LTO_exports.dir\build.make tools/lto/CMakeFiles/LTO_exports.dir/build
make[2]: Entering directory `C:/LLVM_Binaries'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report C:\LLVM_Binaries\CMakeFiles
[ 69%] Creating export file for LTO
cd /d C:\LLVM_Binaries\tools\lto && "C:\Program Files (x86)\CMake\bin\cmake.exe" -E echo EXPORTS > LTO.def
cd /d C:\LLVM_Binaries\tools\lto && type C:/LLVM/tools/lto/lto.exports >> LTO.def
The syntax of the command is incorrect.
make[2]: *** [tools/lto/LTO.def] Error 1
make[2]: Leaving directory `C:/LLVM_Binaries'
make[1]: *** [tools/lto/CMakeFiles/LTO_exports.dir/all] Error 2
make[1]: Leaving directory `C:/LLVM_Binaries'
make: *** [all] Error 2
After digging in this issue quite deeply I've successfully built it. For anyone who might get this error while compiling llvm&clang on windows with gcc: http://reviews.llvm.org/D5476#5e5fbd1d
Of course you can avoid this problem by using the sources from their SVN instead of downloading the latest stable release from http://llvm.org/releases/download.html#3.5
Did you run the configuration file before running cmake?
sh ./configure
If that doesn't work, try using the 32 bit version of your compiler. If that works, you can build for 64-bit by compiling a GCC 32-bit cross compiler.
You could also try Cygwin - perhaps that might help. Or if you're really stuck you could go backtracking and run the problematic command from a terminal, not a makefile.

gdb on mac 10.9 fails with "not in executable format: File format not recognized" for 32+64 arch

$ file app
app: Mach-O universal binary with 2 architectures
app (for architecture i386): Mach-O executable i386
app (for architecture x86_64): Mach-O 64-bit executable x86_64
$ gdb app
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin13.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
"app": not in executable format: File format not recognized
$ file test
test: Mach-O 64-bit executable x86_64
$ gdb test
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin13.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Users/dmulder/test...Reading symbols from /Users/dmulder/test.dSYM/Contents/Resources/DWARF/test...done.
done.
Why would the 64bit binary succeed, but the 64+32 binary fail?
Unfortunately, the non-Apple version of GNU gdb is currently unable to debug universal (or 'fat') binaries (ones that contain both 32-bit and 64-bit executables).
One option is to use lipo to extract a single architecture and run gdb on that:
lipo -thin x86_64 -output app-x86_64 ./app
or
lipo -thin i386 -output app-i386 ./app
If you'd prefer to debug the combined executable, you could try using LLDB, or an Apple version of gdb.
As OP commented, using Apple's gdb will fix the problem.
Here are instructions to build Apple gdb 6.3.50.20050815-cvs from source on OS 10.9:
NOTE: You will need to install Xcode and set up a build environment. If you have Homebrew installed, run brew doctor to see if "Your system is ready to brew."
Download the gdb-1822 source tarball from: http://opensource.apple.com/tarballs/gdb/gdb-1822.tar.gz
Extract this into a temporary directory. Open a terminal and cd into gdb-1822/src.
Run the configure script:
./configure --prefix="$HOME/.local/stow/gdb-1822" --disable-debug --disable-dependency-tracking --with-system-readline
(The last three configure arguments are from the homebrew-dupes formula: https://github.com/Homebrew/homebrew-dupes/blob/master/gdb.rb )
Run make:
make
make install
Follow the instructions at https://sourceware.org/gdb/wiki/BuildingOnDarwin#Creating_a_certificate to create a gdb-cert code signing certificate.
cd into $HOME/.local/stow/gdb-1822/bin and sign the gdb executable:
codesign -s gdb-cert gdb
cd into $HOME/.local/stow and stow the gdb-1822 folder:
stow gdb-1822
Add $HOME/.local/bin to your PATH and either restart the terminal or clear Bash's cache to the location of gdb:
hash -d gdb

Resources