You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucy.apache.org by Milind Gupta <mi...@gmail.com> on 2016/05/31 06:43:31 UTC

[lucy-user] Error Compiling Lucy

Hi,
         I tried compiling Lucy but get stuck at the following error:

$ make
gcc -pedantic -Wall -Wextra -Wno-variadic-macros -std=gnu99 -D_GNU_SOURCE
-D CFP_LUCY -D CFP_TESTLUCY -fvisibility=hidden -O2 -g -fno-strict-aliasing
-fPIC -I . -I ../core -I autogen/include -I
../modules/analysis/snowstem/source/include -I ../modules/unicode/ucd -I
../modules/unicode/utf8proc -c
../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c -o
../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.o
../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.c:4:35:
fatal error: ../include/libstemmer.h: No such file or directory
 #include "../include/libstemmer.h"
                                   ^
compilation terminated.
make: ***
[../modules/analysis/snowstem/source/libstemmer/libstemmer_utf8.o] Error 1

The problem seems to be that in snowstem include files are referred by a
relative path. I started changing the relative path to an absolute path and
adding the include directory in the make file but more and more kept
cropping up. So I think I am doing something wrong here since there must be
a better way?
        If anyone can guide me to the right direction that would be really
helpful.

Thanks and Regards,
Milind

Re: [lucy-user] Error Compiling Lucy

Posted by Marvin Humphrey <ma...@rectangular.com>.
On Wed, Jun 1, 2016 at 4:11 AM, Nick Wellnhofer <we...@aevum.de> wrote:
> On 01/06/2016 00:31, Milind Gupta wrote:
>>
>> One interesting thing is that if I try to compile it
>> on the new Ubuntu Bash on Windows 10 it fails because of the include file
>> not found error that I reported earlier. It compiles fine on a real Ubuntu
>> system.
>
>
> I never heard about the Ubuntu Bash on Windows 10 before. Thanks for
> bringing it up. This seems to be an "insider" feature for now. As soon as it
> is generally available, I'll have a look.
>
> https://msdn.microsoft.com/en-us/commandline/wsl/about

There was a discussion on Hacker News yesterday.  A lot of people
seemed to think it was too buggy for general use at this time.

https://news.ycombinator.com/item?id=11798821

Marvin Humphrey

Re: [lucy-user] Error Compiling Lucy

Posted by Nick Wellnhofer <we...@aevum.de>.
On 01/06/2016 00:31, Milind Gupta wrote:
> One interesting thing is that if I try to compile it
> on the new Ubuntu Bash on Windows 10 it fails because of the include file
> not found error that I reported earlier. It compiles fine on a real Ubuntu
> system.

I never heard about the Ubuntu Bash on Windows 10 before. Thanks for bringing 
it up. This seems to be an "insider" feature for now. As soon as it is 
generally available, I'll have a look.

https://msdn.microsoft.com/en-us/commandline/wsl/about

Nick


Re: [lucy-user] Error Compiling Lucy

Posted by Milind Gupta <mi...@gmail.com>.
Thank you very much Nick for the quick response. Everything worked after I
implemented the fix from teh master branch and was able to successfully
compile Lucy on MinGW. One interesting thing is that if I try to compile it
on the new Ubuntu Bash on Windows 10 it fails because of the include file
not found error that I reported earlier. It compiles fine on a real Ubuntu
system.

Thanks,
Milind

On Tue, May 31, 2016 at 2:04 PM, Nick Wellnhofer <we...@aevum.de>
wrote:

> On 31/05/2016 22:22, Milind Gupta wrote:
>
>> When using MinGW and MinGW32-make clownfish compiling gives errors:
>>
>> 1. The configure.bat generates the cfc compiling recipe as (cd
>> ..\..\compiler\c && $(MAKE)) but that does not work on windows. Each slash
>> should be replaced by a double slash. So I did this step manually.
>>
>
> This is caused by a bug in some versions of mingw32-make:
>
>
> http://mingw.5.n7.nabble.com/mingw32-make-issue-with-windows-style-directories-as-target-dependencies-td21182.html
>
> 2. The runtime compilation gives the following error:
>>
>> src\tls.c: In function 'DllMain':
>> src\tls.c:82:13: error: invalid operands to binary >> (have 'struct
>> cfish_Err *' and 'int')
>>              DECREF(context->current_error);
>>
>
> This was fixed just recently in the master branch with this commit:
>
>
> https://github.com/apache/lucy-clownfish/commit/269ceeb1b4faa3f95bf6e8cedf078b5e9abf4e3c
>
> Nick
>
>

Re: [lucy-user] Error Compiling Lucy

Posted by Nick Wellnhofer <we...@aevum.de>.
On 31/05/2016 22:22, Milind Gupta wrote:
> When using MinGW and MinGW32-make clownfish compiling gives errors:
>
> 1. The configure.bat generates the cfc compiling recipe as (cd
> ..\..\compiler\c && $(MAKE)) but that does not work on windows. Each slash
> should be replaced by a double slash. So I did this step manually.

This is caused by a bug in some versions of mingw32-make:

http://mingw.5.n7.nabble.com/mingw32-make-issue-with-windows-style-directories-as-target-dependencies-td21182.html

> 2. The runtime compilation gives the following error:
>
> src\tls.c: In function 'DllMain':
> src\tls.c:82:13: error: invalid operands to binary >> (have 'struct
> cfish_Err *' and 'int')
>              DECREF(context->current_error);

This was fixed just recently in the master branch with this commit:

https://github.com/apache/lucy-clownfish/commit/269ceeb1b4faa3f95bf6e8cedf078b5e9abf4e3c

Nick


Re: [lucy-user] Error Compiling Lucy

Posted by Milind Gupta <mi...@gmail.com>.
When using MinGW and MinGW32-make clownfish compiling gives errors:

1. The configure.bat generates the cfc compiling recipe as (cd
..\..\compiler\c && $(MAKE)) but that does not work on windows. Each slash
should be replaced by a double slash. So I did this step manually.
2. The runtime compilation gives the following error:


gcc -pedantic -Wall -Wextra -Wno-variadic-macros -std=gnu99 -D_GNU_SOURCE
-D CFP_CFISH -D CFP_TESTCFISH -O2 -g -fno-strict-aliasing -I . -I ..\core
-I src -I autogen\include -c src\tls.c -o src\tls.o
In file included from c:\mingw\include\windef.h:253:0,
                 from c:\mingw\include\windows.h:48,
                 from src\tls.c:46:
src\tls.c: In function 'DllMain':
src\tls.c:82:13: error: invalid operands to binary >> (have 'struct
cfish_Err *' and 'int')
             DECREF(context->current_error);
             ^
src\tls.c:82:13: error: invalid operands to binary & (have 'struct
cfish_Err *' and 'int')
             DECREF(context->current_error);
             ^
src\tls.c:76:19: warning: unused parameter 'dll' [-Wunused-parameter]
 DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved) {
                   ^
src\tls.c:76:45: warning: unused parameter 'reserved' [-Wunused-parameter]
 DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved) {
                                             ^
Makefile:136: recipe for target 'src\tls.o' failed
mingw32-make: *** [src\tls.o] Error 1

Thanks,
Milind

On Tue, May 31, 2016 at 6:34 AM, Milind Gupta <mi...@gmail.com>
wrote:

>
> On May 31, 2016 3:29 AM, "Nick Wellnhofer" <we...@aevum.de> wrote:
> >
> > Problems with path names typically occur on Windows. Which platform are
> you building on?
>
> I am building on Windows using the bash terminal. I also tried building
> using the Ubuntu bash.
>
> If you're using MinGW, you have to build with `mingw32-make`.
>
> I just used make on the terminal. clownfish compiled fine.
>
> If you're on Cygwin, what's the output of `which gcc`?
> >
> > Which version of Lucy are you trying to build?
>
> I am building the latest one from the website i.e. 0.5.1
>
> >
> > Nick
>

Re: [lucy-user] Error Compiling Lucy

Posted by Milind Gupta <mi...@gmail.com>.
On May 31, 2016 3:29 AM, "Nick Wellnhofer" <we...@aevum.de> wrote:
>
> Problems with path names typically occur on Windows. Which platform are
you building on?

I am building on Windows using the bash terminal. I also tried building
using the Ubuntu bash.

If you're using MinGW, you have to build with `mingw32-make`.

I just used make on the terminal. clownfish compiled fine.

If you're on Cygwin, what's the output of `which gcc`?
>
> Which version of Lucy are you trying to build?

I am building the latest one from the website i.e. 0.5.1

>
> Nick

Re: [lucy-user] Error Compiling Lucy

Posted by Nick Wellnhofer <we...@aevum.de>.
On 31/05/2016 08:43, Milind Gupta wrote:
> The problem seems to be that in snowstem include files are referred by a
> relative path.

Problems with path names typically occur on Windows. Which platform are you 
building on? If you're using MinGW, you have to build with `mingw32-make`. If 
you're on Cygwin, what's the output of `which gcc`?

Which version of Lucy are you trying to build?

Nick