Need Help Configuring Build

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Dentrassi BBQ
Posts: 6
Joined: Mon Feb 18, 2013 6:52 pm

Need Help Configuring Build

Postby Dentrassi BBQ » Mon Aug 28, 2017 4:59 pm

Greetings! I keep the Freeciv package up to date within the Fink package managing system. Traditionally, our port of the package has only offered the GTK2 client. I'm attempting to widen the offerings by including a QT and eventually a GTK3 client. However, the package manager has strict rules forbidding packages from over-writing one another. Therefore i need to separate out the clients from the backend stuff. My first attempt builds the server with:

Code: Select all

--enable-client=stub  --enable-fcmp=no


and the GTK2 client with:

Code: Select all

--disable-server --without-freeciv-manual --enable-client=gtk2 --enable-fcmp=gtk2


It's still not working, though. Installing this server and client gives me:

Unpacking freeciv-gtk2 (from .../freeciv-gtk2_2.5.9-15_darwin-x86_64.deb) ...
/sw/bin/dpkg: error processing /sw/fink/dists/local/main/binary-darwin-x86_64/freeciv-gtk2_2.5.9-15_darwin-x86_64.deb (--install):
trying to overwrite `/sw/lib/libfreeciv.a', which is also in package freeciv


Did i miss something in the configure help which would suppress building the library in one or the other of these? I really need it to either be in the server package or the client package but not both...

cazfi
Elite
Posts: 1400
Joined: Tue Jan 29, 2013 6:54 pm

Re: Need Help Configuring Build

Postby cazfi » Mon Aug 28, 2017 5:22 pm

Both server and client needs the common part (libfreeciv). You can't built either without building it first.

Are you using results of 'make install' directly? If so, you need to rethink it so that you have an additional step where you select what really gets to the package and what not. Since libfreeciv.a is a static library, you don't actually need it at runtime at all.

Dentrassi BBQ
Posts: 6
Joined: Mon Feb 18, 2013 6:52 pm

Re: Need Help Configuring Build

Postby Dentrassi BBQ » Wed Sep 06, 2017 8:47 pm

Are you using results of 'make install' directly?


Indirectly, unfortunately. I put the desired flags in a data file that the package manager uses to build the package, but the manager massages the build process in other ways, such as changing the final install path. It's a scripted process, so i can't do anything 'by hand'. The (hopefully) relevant portions look like this:


Code: Select all

ConfigureParams: <<
   (%type_raw[-client] = .) --enable-client=stub \
   (%type_raw[-client] = .) --enable-fcmp=no \
   (%type_raw[-client] = -gtk2) --disable-server \
   (%type_raw[-client] = -gtk2) --without-freeciv-manual \
   (%type_raw[-client] = -gtk2) --enable-client=gtk2 \
   (%type_raw[-client] = -gtk2) --enable-fcmp=gtk2 \
   (%type_raw[-client] = -qt5) --disable-server \
   (%type_raw[-client] = -qt5) --without-freeciv-manual \
   (%type_raw[-client] = -qt5) --enable-client=qt \
   (%type_raw[-client] = -qt5) --enable-fcmp=qt \
   --enable-dependency-tracking \
   --with-sdl-prefix=%p \
   --disable-sdltest \
   --mandir=%p/share/man \
   --with-ggz-client=NO \
   --with-ggz-server=NO \
   --with-libiconv-prefix=%p/lib/ \
   --with-x
<<
CompileScript: <<
   %{default_script}
   fink-package-precedence .
<<
InstallScript: <<
  /usr/bin/make install DESTDIR=%d
<<


Both server and client needs the common part (libfreeciv). --- Since libfreeciv.a is a static library, you don't actually need it at runtime at all.


Excellent. I can leave it in the server build, and kludge it so that each client depends upon the server. Or, create another package just for shared libraries and have all clients and the server depend upon that. How would i build just libfreeciv.a (and similar odds & ends)?

Dentrassi BBQ
Posts: 6
Joined: Mon Feb 18, 2013 6:52 pm

Re: Need Help Configuring Build

Postby Dentrassi BBQ » Thu Sep 14, 2017 11:45 am

Alright, nobody bit on that one. How, then, do i
have an additional step where you select what really gets to the package
?