openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
868 stars 210 forks source link

make error when "Making all in VirtuosoClient.Net" #765

Closed bilalix closed 6 years ago

bilalix commented 6 years ago

I'm using Fedora release 28 (Twenty Eight) 64-bits.

After cloning the develop/7 repo, I typed the following commands successively:

./autogen.sh
CC=cc
CFLAGS="-O2 -m64"
export CFLAGS CC
./configure
make

The output of : ./autogen.sh , ./configure and make

Last lines of make command, showing the error:

Making all in VirtuosoClient.Net
Makefile:39: *** commands commence before first target.  Stop.
make[2]: Entering directory `/home/bilal/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
make[2]: Leaving directory `/home/bilal/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bilal/git/virtuoso-opensource/binsrc'
make: *** [all-recursive] Error 1

As far as I found, this is tabs/spaces issue, but I don't know how to solve it.

Edit : I had the same issue with stable/7.

HughWilliams commented 6 years ago

Do you have --enable-mono set for your build? This would trigger the attempt to build the VirtuosoClient.Net (the Mono/.Net Virtuoso provider), and should be disabled by default, as indicated from the configure --help output:

  --enable-mono           enable Mono extension
  --disable-mono          disable Mono extension (default)

Building this provider requires that the Mono Framework be installed on your system.

TallTed commented 6 years ago

@bilalelhoudaigui - For future pastebins and similar, please be sure to copy-and-paste terminal output without formatting codes and command characters, which obscure the needed content. For instance, Options(B should just be Options.

As @HughWilliams suggests, it seems that you may have enabled the disabled-by-default build of the ADO.NET Provider, which requires Mono in non-Windows environments.

You said that you executed a few commands, including ./configure. I want to be certain that there weren't any arguments on this command when you ran it, such as ./configure --enable-mono.

Regarding your thought that this may be a tabs/spaces issue, we could take a look at your local binsrc/VirtuosoClient.Net/Makefile which triggered the initial error. Note that while we may eliminate this error by changing that whitespace, that will probably just lead to a different error about the lack of Mono ... unless you do have that installed. You might prefer to simply disable the build of this Provider, by doing this before you run make --

cd binsrc/VirtuosoClient.Net ; mv Makefile Makefile.disabled
bilalix commented 6 years ago

@HughWilliams - Even though I installed Mono it didn't work.

$ mono --version
Mono JIT compiler version 5.14.0.177 (tarball Sat Aug  4 08:32:47 UTC 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    Interpreter:   yes
    LLVM:          yes(3.6.0svn-mono-/)
    GC:            sgen (concurrent by default)

@TallTed - Sorry I edited the pastebins, concerning the ./configure I'm certain that I executed it alone without adding any parameters.

When I explicitly disabled mono-mode (./configure --disable-mono) I got this error:

Making all in VirtuosoClient.Net
make[2]: Entering directory '/home/bil/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
Makefile:39: *** recipe commences before first target.  Stop.
make[2]: Leaving directory '/home/bil/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
make[1]: *** [Makefile:405: all-recursive] Error 1
make[1]: Leaving directory '/home/bil/git/virtuoso-opensource/binsrc'
make: *** [Makefile:526: all-recursive] Error 1

The error I got after renaming the Makefile (cd binsrc/VirtuosoClient.Net ; mv Makefile Makefile.disabled) :

Making all in VirtuosoClient.Net
make[2]: Entering directory '/home/bil/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
make[2]: *** No rule to make target 'all'.  Stop.
make[2]: Leaving directory '/home/bil/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
make[1]: *** [Makefile:405: all-recursive] Error 1
make[1]: Leaving directory '/home/bil/git/virtuoso-opensource/binsrc'
make: *** [Makefile:526: all-recursive] Error 1
TallTed commented 6 years ago

@bilalelhoudaigui - OK, so rather than renaming, we need to edit the /home/bil/git/virtuoso-opensource/binsrc/VirtuosoClient.Net/Makefile. There's probably a tab indent on line 39 that should be replaced with spaces.

bilalix commented 6 years ago

@TallTed - When I replaced Tab with spaces I got this error:

Making all in VirtuosoClient.Net
make[2]: Entering directory '/home/bilal/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
Makefile:39: *** missing separator.  Stop.
make[2]: Leaving directory '/home/bilal/git/virtuoso-opensource/binsrc/VirtuosoClient.Net'
make[1]: *** [Makefile:405: all-recursive] Error 1
make[1]: Leaving directory '/home/bilal/git/virtuoso-opensource/binsrc'
make: *** [Makefile:526: all-recursive] Error 1

Concerning the Makefile:

SOURCES =  
    $(srcdir)/ArrayOfLongPacked.cs  # <-- This is the content of line 39 in `Makefile`
    $(srcdir)/AssemblyInfo.cs  

I think It should be a Tab there as it was already.

TallTed commented 6 years ago

@bilalelhoudaigui -

Snippets are hard to analyze, not least because clues to resolving things often come before the error message.

Please zip or gzip /home/bil/git/virtuoso-opensource/binsrc/VirtuosoClient.Net/Makefile in its original form (i.e., with the content that produced the recipe commences before first target error), and attach the archive to this issue. I'm asking for this as an archived attachment, to be certain that its content is not changed along the way.

The complete output of the make run (again, as an attachment) may also be helpful.

bilalix commented 6 years ago

@TallTed - Sorry for the late reply.

Here is the Makefile.zip and the complete output of the make command.

pkleef commented 6 years ago

Hi @bilalelhoudaigui

I have checked the Makefile you just sent and it looks like it was not properly generated.

Considering you reported using Fedora Core 28, I created a new VM to test the build and I see —

$ automake --version
automake (GNU automake) 1.15.1

— yet the Makefile you sent has as a first line —

$ head -1 Makefile
# Makefile.in generated by automake 1.9 from Makefile.am.

There could be some incompatibility there, so we first need to identify why your system has such a very old version installed.

I have tested the standard autoconf and automake tools on my Fedora 28 VM and they produce the correct results, so I would like you to run the sh ./autogen.sh in the top level directory of your virtuoso-opensource tree, which will produce output like this —

$ sh ./autogen.sh

Checking build environment ...
Using aclocal (GNU automake) 1.15.1
Using autoconf (GNU Autoconf) 2.69
Using autoheader (GNU Autoconf) 2.69
Using automake (GNU automake) 1.15.1
Using libtoolize (GNU libtool) 2.4.6
Using bison (GNU Bison) 3.0.4
Using flex 2.6.1
Using GNU Awk 4.2.1, API: 2.0 (GNU MPFR 3.1.6-p2, GNU MP 6.1.2)
Using GNU gperf 3.1
Using OpenSSL 1.1.0h-fips  27 Mar 2018

Generating build scripts ...
Running libtoolize ...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'binsrc/config'.
libtoolize: copying file 'binsrc/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'binsrc/config'.
libtoolize: copying file 'binsrc/config/libtool.m4'
libtoolize: copying file 'binsrc/config/ltoptions.m4'
libtoolize: copying file 'binsrc/config/ltsugar.m4'
libtoolize: copying file 'binsrc/config/ltversion.m4'
libtoolize: copying file 'binsrc/config/lt~obsolete.m4'
Running aclocal ...
Running autoheader ...
Running automake ...
Running autoconf ...

Please check the INSTALL and README files for instructions to
configure, build and install Virtuoso on your system.

Certain build targets are only enabled in maintainer mode:

    ./configure --enable-maintainer-mode ...

Bootstrap script completed successfully.

This should regenerate all the Makefile.in files from the Makefile.am templates.

Note that I am using a stock installation of Fedora 28 64bit, so I would expect you to have the same versions as shown in my output above. Next, execute the following command which will generate the proper Makefiles for you to use for building —

$ sh ./config.nice

I tested a clean build both before and after installing the mono compiler, which I installed using —

$ sudo dnf install mono-core

After installing, I reran the config.nice script to make sure the configure phase would be able to locate the mono compiler and activate the build rules in the binsrc/VirtuosoClient.Net/Makefile to build:

$ cd binsrc/VirtuosoClient.Net
$ ls -l *.dll
-rwxr-xr-x 1 pkleef pkleef  214528 Aug 17 18:29 OpenLink.Data.Virtuoso.dll 

Note: The ''-disable--mono' and '--enable-mono' options have no effect on building the .NET client adapter. These options are for a special mono hosting runtime environment which we supported a long time ago. However, with recent changes in the structure of Mono, this hosting module will most likely not compile, and may be removed in an upcoming version.

Please let me know how you are getting on, so i can further assist you.

bilalix commented 6 years ago

@pkleef - I'm the one who explicitly installed automake version 1.9 as written in the ReadMe file (I did the same with autoconf, libtool etc) I thought this may help avoiding incompatibilities issues.

I reinstalled the correspond versions shown in your sh ./autogen.sh output, run it afteward and got the same output as yours. Next, I didn't find ./config.nice file so I run the normal ./configure & make & make install. Everything went smoothly, Now I'm waiting for the make check result.

@TallTed, @pkleef, @HughWilliams Thank you for your time ! I did a mistake by downgrading the tools.