GithubHelp home page GithubHelp logo

linux compiling issues about ghostplusplus HOT 5 CLOSED

luistj avatar luistj commented on August 12, 2024
linux compiling issues

from ghostplusplus.

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
If you don't have the proper dependencies than there is no reason for the 
program to
compile.

Libboost-dev and libmysqlclient-dev are library files (hence the "lib...") that 
are
used by a number of different programs.  Feel free to visit google to read up 
on more
on what these do (to be honest I have no idea what the boost one does).

Since Ghost++ uses these library files in its process, there are 3 ways around 
having
to install the extra programs:
1.  Install Ghost++ from a package manager like apt-get which will 
automatically see
you are missing the dependencies and install them for you.  To add a package to
apt-get or other package managers is a bit of work, and as far as I'm aware 
isn't
currently included in any package managers.
2.  Rewrite the parts of these lib files that are needed into the program.  
This will
be lots of work for the programmers, make the programs larger, and is ultimately
pointless.
3.  Include these library files in their entirety into the Ghost++ compile 
process. 
Again, this will make the program larger and is ultimately pointless and may 
violate
terms of use.

This is a very typical compilation/install process, you just may not see it 
since
most of the programs you probably use in Ubuntu have this entire process done 
for you.

Resolution: Get Ghost++ added to the Ubuntu repository or some other apt-get
repository so you can install this from apt-get.  This doesn't really relate to
Ghost++ itself and is a pretty independent effort (though it needs to be 
maintained
by someone who updates the repository with new dependency/version information as
Ghost++ updates).

Your #include <string.h> issue is a valid concern.  I'm just glad that someone 
put
together that nice guide in the forums that helped me through all these issues,
though this would be something that will hopefully be easy to fix in later 
versions.

Finally: The reason why it cannot contain the linux executable is because 
important
stuff happen in the compilation process.  For example, that executable still 
needs
those library files, so you'd still have to have libboost-dev and 
libmysqlclient-dev,
and those files are located during the process.  An executable file for Ubuntu
wouldn't work for Gentoo or other version of linux.  The only way to avoid 
having 20
different versions of Ghost++ for a ton of different versions of linux is to 
just
have everyone compile it themselves.

Even if you go try to get a more mature program like Firefox, if you download 
the
linux version you will just get the source code and are expected to install the
dependencies and then compile it from scratch very similar to how you had to do
Ghost++.  Most versions of linux are set up to install most main stream 
programs for you.

Original comment by [email protected] on 19 May 2009 at 6:08

from ghostplusplus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
Sorry, my previous comment was written late last night.  I apologize if I came 
off as
overly negative.  I think I may be incorrect that the executable requires the 
library
files... it might just be the installation like you implied, but I am not sure.

Anyway, another idea to make it more user friendly is to create a little script 
to
help linux users out.  Here is my first crack at a script (a few holes here... 
not
sure how to detect for the various dependencies)

#!/bin/bash
#This script will compile Ghost++ for you when run

#Make sure user is root
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi

#Check for build-essentials, zlib, and libbz2
echo -n "Checking for build-essentials..."
if [[ ??? ]]; then
   echo "Found."
else
   echo "Missing. Please install build-essentials."
   exit 1
fi

echo -n "Checking for zlib..."
if [[ ??? ]]; then
   echo "Found."
else
   echo "Missing. Please install zlib."
   exit 1
fi

echo -n "Checking for libbz2..."
if [[ ??? ]]; then
   echo "Found."
else
   echo "Missing. Please install libbz2."
   exit 1
fi

#Check for libboost-dev
echo -n "Checking for libboost-dev..."
if [[ ??? ]]; then
   echo "Found."
else
   echo "Missing. Please install libboost-dev."
   exit 1
fi
#Check for libmysqlclient-dev
echo -n "Checking for libmysqlclient-dev..."
if [[ ??? ]]; then
   echo "Found."
else
   echo "Missing. Please install libmysqlclient-dev."
   exit 1
fi

#Compile bncsutil and stormlib
CurrDir = $PWD

echo -n "Installing bncsutil..."
cd "$CurrDir/bncutil/"
make
if [[ $? ]]; then
  echo "Install Failed. Aborting."
  exit 1
fi
make install
if [[ $? ]]; then
  echo "Install Failed. Aborting."
  exit 1
else
  echo "Success."
fi

echo -n "Installing StormLib..."
cd "$CurrDir/StormLib/"
make
if [[ $? ]]; then
  echo "Install Failed. Aborting."
  exit 1
fi
make install
if [[ $? ]]; then
  echo "Install Failed. Aborting."
  exit 1
else
  echo "Success."
fi


echo -n "Compiling Ghost++..."
cd "$CurrDir/ghost/"
make
if [[ $? ]]; then
  echo "Compile Failed. Aborting."
  exit 1
else
  echo "Success."
  cp "$CurrDir/ghost/ghost++" "$CurrDir/ghost++"
  echo "Ghost++ is now successfully installed.  Please configure your ghost.cfg then
type \"ghost++\" to execute."
fi

Original comment by [email protected] on 19 May 2009 at 9:05

from ghostplusplus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
The reason I mentioned libboost and libmysql is because there is code for them
contained in the ghost++ zip but the makefile is not finding it. Unless those 
files
were only put there for Windows users it is a makefile problem. This would also
explain why I had to figure out the dependencies rather than following the 
wiki. My
point in the post is that either the wiki is in error or the makefile is.

Boost at least is only necessary to install bncsutil and/or stormlib, I can't
remember which. Both of those I compiled into .so files and then made a script 
to
link them with ghost++ and run. Originally I was thinking they could just be 
compiled
into .so files and shipped with an executable and a script but after looking 
into it
some I guess there are too many potential compatibility issues so I agree that 
is a
bad idea (though a compile script that compiles bncsutil, stormlib, ghost++, 
then
moves the .so files into a lib directory and makes a run script would be handy).

>>The reason why it cannot contain the linux executable is because important
stuff happen in the compilation process.  For example, that executable still 
needs
those library files, so you'd still have to have libboost-dev and 
libmysqlclient-dev,
and those files are located during the process.

This is false. The dev libraries are only needed for compiling. Hence the 
reason they
are separate in package managers and not generally installed by default.

Original comment by [email protected] on 22 May 2009 at 4:35

from ghostplusplus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024
1.) The boost directory included in GHost++ contains precompiled boost 
libraries for
Windows users only (more specifically, for Visual C++ users only). It is not 
used on
Linux and in either case it doesn't contain any headers so it's not a complete
package for anyone, it just makes it easier for Windows users to compile 
GHost++.

2.) Boost is only necessary to compile GHost++, not bncsutil or StormLib. It's
actually only used for threading at the moment, which means it's only necessary 
if
you want to compile GHost++ with MySQL support. This may change in the future as
there are quite a few additional features of Boost that I may choose to make 
use of
eventually.

3.) The dev libraries include things like headers which are needed for 
compiling, the
library files are still required in both cases. The non "-dev" versions of the
repository packages generally just install the shared objects and not much else 
as
far as I'm aware.

4.) I won't be including any "Linux binaries" because, as previously mentioned,
there's no such thing as a generic Linux binary since they are not portable 
between
distributions and sometimes even between fairly similar systems. I admit it 
would be
nice to provide a more traditional "configure, make, make install" process but 
I do
not know how to write a configure script and I don't plan to learn how. This is
because the last time I researched it a few years ago (e.g. I know that you use
autoconf and other tools to help you) I was unable to find any instructions 
that made
sense to me and I became too confused and gave up on it.

5.) The string.h thing in warden.cpp is a moot point now as that file has been
removed from the repository. This issue crops up occasionally because my 
compiler
doesn't complain about string.h so I often overlook it when I make use of
memset/memcpy/etc in a new file.

Original comment by hogantp on 24 May 2009 at 4:54

from ghostplusplus.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 12, 2024

Original comment by hogantp on 17 Jul 2009 at 6:15

  • Changed state: WontFix

from ghostplusplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.