WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Gluster compilation & makefile  (Read 4680 times)

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Gluster compilation & makefile
« on: April 13, 2017, 07:14:24 AM »
Hello,

I encounter an issue while trying to compile manually gluster from tar.gz sources !  Don't know whether it is something feseable or not  ::)
Let's still try ...
After many tce-load ... and a manual compilation of "userspace-rcu-latest-0.9.tar.bz2", ./configure step seems OK (log in attachement).
So this, produces an automatic Makefile which looks not correct and stoppes the make step.

I think something goes wrong with new lines or something like that but I don't succeed to solve this issue.
Do you think it is possible to install gluster on corepure64 ?

PS : Using Microcore 64 bits 7.2

Julien

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #1 on: April 13, 2017, 07:31:18 AM »
perhaps this is your problem:
Code: [Select]
build_triplet = It is not expected to execute this script. When you are building from a
released tarball (generated with 'make dist'), you are expected to pass
--build=... and --host=... to ./configure or replace this config.sub script in
the sources with an updated version.
host_triplet = It is not expected to execute this script. When you are building from a
released tarball (generated with 'make dist'), you are expected to pass
--build=... and --host=... to ./configure or replace this config.sub script in
the sources with an updated version.

what error message do you get when "make" stops?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #2 on: April 13, 2017, 08:02:09 AM »
if you overwrite config.sub and config.guess in the glusterfs source with those from the libtool extension it should fix things

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Re: Gluster compilation & makefile
« Reply #3 on: April 13, 2017, 08:30:34 AM »
Hello
Thanks for you quick feedback

I tried to overwrite config.sub and config.guess of gluster source.
The new files are copied from userspace-rcu-0.9.3/config/config.sub and config.guess

It still doesn't work for me.
I didn't find other config.sub & .guess files in other locations inside the filesystem

------- To reply to your first answer --------
With original config.sub & config.guess from gluster sources

Actually I have :
Makefile:90: *** missing separator.  Stop.

But if I put the entire text on the same, I get another same error at line 407 and so on ...
Finally if I correct all those "\n" errors I get another one quiete different while doing "make" again :
#make
make --no-print-directory --quiet all-recursive
Making all in libglusterfs
Makefile:89 *** missing separator. Stop.
Makefile:579: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:478: recipe for target 'all' failed
make: *** [all] Error 2



I wonder 1 thing particularly :
./configure has worked well.
So if ./configure step is ok, are we sure now that gluster is compilable over corepure64 ? (regardless all syntax errors)

Julien

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #4 on: April 13, 2017, 08:34:43 AM »
Code: [Select]
$ tce-load -i libtool
$ cp /tmp/tcloop/libtool/usr/local/share/libtool/build-aux/config.* /path-to-folder/glusterfs-3.10.1

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Re: Gluster compilation & makefile
« Reply #5 on: April 13, 2017, 08:55:22 AM »
Still not work after this cp on my side

Just to summarize, you keep my first makefile or you performed your own one ?
Because now if I try to ./configure with the new .sub & .guess from libtool, I get an error "The xml2-config script installed by LIBXML could not be found ... libxml2 devel libraries not found"
It tells me to check PREFIX or PATH.

With the original .sub & .guess, i don't have this error

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Re: Gluster compilation & makefile
« Reply #6 on: April 13, 2017, 09:07:41 AM »
OK so ...

with the new files and tce-load -wi libxml2-dev.tcz it's widely better

./configure & make
But make fails after "making all in src"
/usr/local/lib/libfl.so: undefined reference to 'yylex'
collect2: error: ld retruned 1 exit status

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #7 on: April 13, 2017, 09:44:10 AM »
IfI understand correctly, the function yylex is not present in libfl.so, but it is present in libfl.a, so this should fix things (use command before "make"):
Code: [Select]
$ find . -name Makefile -type f -exec sed -i 's@-lfl@/usr/local/lib/libfl.a@g' {} \;

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Re: Gluster compilation & makefile
« Reply #8 on: April 13, 2017, 09:55:53 AM »
Before seeing your answer ... The solution was to run configure with an empty LEXLIB:

~~~~
make clean
./configure LEXLIB=
make
make install
~~~~


Everythng looks fine but now I'm going to see if gluster works properly

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Re: Gluster compilation & makefile
« Reply #9 on: April 13, 2017, 10:46:52 AM »
The following may help someone else ...

I got the following issue while running gluster  >>>  error while loading shared libraries libglusterfs.so.0

Its mostly the PATH issue.
1.  find / -name libglusterfs.so     to see where is located the shared library (basically in /usr/local/lib)
2.  try ldconfig -p to see if you have libfuse.so and libglusterfs.so
3.  then, try adding '/usr/local/lib' in /etc/ld.so.conf, and run ldconfig. It should work fine. (make sure you build GlusterFS again with proper libfuse.so, which should be detected after running ldconfig).

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #10 on: April 13, 2017, 10:51:58 AM »
/usr/local/lib is already in ld.so.conf...

Offline julien_g

  • Newbie
  • *
  • Posts: 13
Re: Gluster compilation & makefile
« Reply #11 on: April 14, 2017, 03:49:02 AM »
yes. In my situation it was present too.
But seems not considered !
Running ldconfig separately solved the issue ...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #12 on: April 14, 2017, 04:05:24 AM »
It's an issue of "make install" - most source packages will run "ldconfig" after they install libs, but apparently glusterfs does not.

If you make an extension out of glusterfs, "tce-load" will run "ldconfig" for you each time it is loaded.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14790
Re: Gluster compilation & makefile
« Reply #13 on: April 29, 2017, 09:32:51 AM »
glusterfs posted (but not tested)
« Last Edit: April 29, 2017, 12:18:19 PM by Juanito »