PDA

View Full Version : Cleaning up autotools



tanner
10-29-2008, 04:28 PM
Continued saga in cleaning up the autotools stuff.

There's a significant amount of code checking for --enable-old-compiler, do we really wannt support gcc-2.96 or older?

I even question gcc-3.x, aren't all the distros on gcc-4.x now?

Dumping support for gcc-2.96 would drop lots of cruft in multiple files.

tanner
10-29-2008, 04:34 PM
Some random --configure option questions:

Is anyone supporting the --enable-cgi code base?

--enable-mpr ?
--enable-mpatrol ?
--enable-profiling ?

purple
10-31-2008, 01:44 PM
No one has any clue how any of this works. Your questions are gibberish! Just pick something that makes sense and do it.

tanner
11-01-2008, 10:17 AM
Someone got up on the crabby side of the bed today.

tanner
11-03-2008, 06:21 PM
Threw out autotools in frustration. Building showeq via cmake (http://www.cmake.org/). Details below. My QQ story at the end.

sf.net stability really ticks me off, so I host the cmake build code on launchpad. The choice of launchpad forces(?) you to use bzr.

So I took svn trunk, created a bzr branch, did all my cmake work on the bzr branch. I can easiliy diff and submit patches against svn if it's decided to move to cmake builds.

Showeq cmake code, instructions how to download it, whiteboard, and revision history:
https://code.launchpad.net/~showeq-team/showeq/cmake

Bugs:
https://bugs.launchpad.net/showeq

Please do not bother the upstream developers with issues on this branch. Use the above bug tracker and I'll work the problems I can and will push issues to upstream that aren't related to the cmake build.

Answer (FAQ):
https://answers.launchpad.net/showeq

QQ Story

I tried to clean up autotools but always ended up with 2 different versions of the build files.

In my particular case, 1 set macros for "older" autotool for Ubuntu hardy and another set for Ubuntu interpid. Debian wasn't as bad, but I had to tweak between Etch and Lenny.

I stepped out of the .deb world and into .rpm land with CentOS-5 and more tweaks. EL5 was the same as CentOS5 (good job CentOS people!)

Left Linux land and tried FreeBSD. It's in FreeBSD-land where I really started to understood how terrible the autotools are to maintain (or how terrible they are in showeq to maintain :-) ) for a cross-operating system project.

The "autotool problem" is not a problem that is unique to showeq, so I looked around other QT/KDE projects and found cmake. Used by the KDE team. I started the work to get things to compile under cmake.

Did not take long to get things converted over to cmake. Hardest part was the whole .moc, uic, include stuff.

Happy to say -one- set of cmake configuration files builds (no tweaks!) on:

Debian - Etch
Debian - Lenny
Ubuntu - Hardy
Ubuntu - Intrepid
CentOS - 5
Enterprises Linux 5
FreeBSD 7

Looking forward to bug reports and feedback.

Could_Be_Anyone
11-06-2008, 08:20 AM
Trying this on Gentoo 2008.0
I have no idea if I'm doing this right, however.
grabbed files...
bzr branch lp:~showeq-team/showeq/cmake

in downloaded directory, issued commands:

cmake .

make

errors out with:

[ 57%] Building CXX object src/CMakeFiles/showeq.dir/packetformat.o
[ 58%] Building CXX object src/CMakeFiles/showeq.dir/interface.o
/root/SEQ/bzr/cmake/src/interface.cpp: In member function 'void EQInterface::set_filter_AudioCommand(int)':
/root/SEQ/bzr/cmake/src/interface.cpp:3181: error: expected `)' before 'PKGDATADIR'
make[2]: *** [src/CMakeFiles/showeq.dir/interface.o] Error 1
make[1]: *** [src/CMakeFiles/showeq.dir/all] Error 2
make: *** [all] Error 2

tanner
11-07-2008, 01:39 AM
errors out with:

EQInterface::set_filter_AudioCommand(int)':
/root/SEQ/bzr/cmake/src/interface.cpp:3181: error: expected `)' before 'PKGDATADIR'
make[2]: *** [src/CMakeFiles/showeq.dir/interface.o] Error 1
make[1]: *** [src/CMakeFiles/showeq.dir/all] Error 2
make: *** [all] Error 2

What version of cmake?

% cmake --version

Try doing

% cmake .
% make

again, does that work?

Open ticket up: https://bugs.launchpad.net/showeq/+bug/295030

Could_Be_Anyone
11-07-2008, 08:27 AM
~ $ cmake --version
cmake version 2.4-patch 6


=========================
test # bzr branch lp:~showeq-team/showeq/cmake

You have not informed bzr of your launchpad login. If you are attempting a
write operation and it fails, run "bzr launchpad-login YOUR_ID" and try again.
Branched 17 revision(s).

test # cd cmake
cmake # cmake .

This apparently completes ok, last line of output is:
-- Build files have been written to: ..../test/cmake

cmake # make
[ 1%] Generating mapicondialog.h
[ 2%] Generating spawnshell.moc
[ 3%] Generating spawnlist.moc
[ 4%] Generating spellshell.moc
[ 5%] Generating spelllist.moc
[ 6%] Generating editor.moc
[ 6%] Generating packetstream.moc
[ 7%] Generating packetinfo.moc
[ 8%] Generating packet.moc
[ 9%] Generating interface.moc
[ 10%] Generating compass.moc
[ 11%] Generating map.moc
[ 12%] Generating experiencelog.moc
[ 13%] Generating combatlog.moc
[ 14%] Generating player.moc
[ 14%] Generating skilllist.moc
[ 15%] Generating statlist.moc
[ 16%] Generating filtermgr.moc
[ 17%] Generating category.moc
[ 18%] Generating compassframe.moc
[ 19%] Generating group.moc
[ 20%] Generating guild.moc
[ 21%] Generating netdiag.moc
[ 21%] Generating logger.moc
[ 22%] Generating xmlpreferences.moc
[ 23%] Generating seqwindow.moc
[ 24%] Generating seqlistview.moc
[ 25%] Generating zonemgr.moc
[ 26%] Generating spawnmonitor.moc
[ 27%] Generating spawnpointlist.moc
[ 28%] Generating spawnlistcommon.moc
[ 29%] Generating spawnlist2.moc
[ 29%] Generating datetimemgr.moc
[ 30%] Generating spawnlog.moc
[ 31%] Generating packetlog.moc
[ 32%] Generating messages.moc
[ 33%] Generating messagefilter.moc
[ 34%] Generating messagewindow.moc
[ 35%] Generating messageshell.moc
[ 36%] Generating terminal.moc
[ 37%] Generating filteredspawnlog.moc
[ 37%] Generating messagefilterdialog.moc
[ 38%] Generating mapicon.moc
[ 39%] Generating filternotifications.moc
[ 40%] Generating guildshell.moc
[ 41%] Generating guildlist.moc
[ 42%] Generating bazaarlog.moc
[ 43%] Generating mapicondialog.cpp
[ 44%] Generating mapicondialog.moc.cpp
Scanning dependencies of target showeq
[ 44%] Building CXX object src/CMakeFiles/showeq.dir/main.o
[ 45%] Building CXX object src/CMakeFiles/showeq.dir/spawn.o
[ 46%] Building CXX object src/CMakeFiles/showeq.dir/spawnshell.o
[ 47%] Building CXX object src/CMakeFiles/showeq.dir/spawnlist.o
[ 48%] Building CXX object src/CMakeFiles/showeq.dir/spellshell.o
[ 49%] Building CXX object src/CMakeFiles/showeq.dir/spelllist.o
[ 50%] Building CXX object src/CMakeFiles/showeq.dir/vpacket.o
[ 51%] Building CXX object src/CMakeFiles/showeq.dir/editor.o
[ 51%] Building CXX object src/CMakeFiles/showeq.dir/filter.o
/root/SEQ/test/cmake/src/filter.cpp: In constructor 'FilterItem::FilterItem(const QString&, bool)':
/root/SEQ/test/cmake/src/filter.cpp:126: warning: large integer implicitly truncated to unsigned type
[ 52%] Building CXX object src/CMakeFiles/showeq.dir/packetfragment.o
[ 53%] Building CXX object src/CMakeFiles/showeq.dir/packetstream.o
[ 54%] Building CXX object src/CMakeFiles/showeq.dir/packetinfo.o
[ 55%] Building CXX object src/CMakeFiles/showeq.dir/packet.o
[ 56%] Building CXX object src/CMakeFiles/showeq.dir/packetcapture.o
/root/SEQ/test/cmake/src/packetcapture.cpp:31:2: warning: #warning socket
[ 57%] Building CXX object src/CMakeFiles/showeq.dir/packetformat.o
[ 58%] Building CXX object src/CMakeFiles/showeq.dir/interface.o
/root/SEQ/test/cmake/src/interface.cpp: In member function 'void EQInterface::set_filter_AudioCommand(int)':
/root/SEQ/test/cmake/src/interface.cpp:3181: error: expected `)' before 'PKGDATADIR'
make[2]: *** [src/CMakeFiles/showeq.dir/interface.o] Error 1
make[1]: *** [src/CMakeFiles/showeq.dir/all] Error 2
make: *** [all] Error 2

tanner
11-07-2008, 10:10 AM
I can confirm the problem on gentoo. I'm looking into it.

tanner
11-21-2008, 10:18 AM
test # cd cmake
cmake # cmake .


Can you list the first 15 or so lines cmake outputs?

$ cmake .
-- Version: 5.12.7.0
-- DATA_INSTALL_DIR: /usr/local/share/showeq
-- PKGDATADIR: /usr/local/share/showeq
-- showeq is used as APPLICATION_NAME

My guess is the PKGDATADIR is not being set.

Could_Be_Anyone
11-23-2008, 08:41 AM
Looks like you might be right, at least that looks to be blank.

========================
michelle test2 # cd cmake
michelle cmake # cmake .
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Version: 5.12.7.0
-- DATA_INSTALL_DIR:
-- PKGDATADIR:
-- showeq is used as APPLICATION_NAME
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found ZLIB: /lib/libz.so
-- Looking for pcap_open_offline in pcap
-- Looking for pcap_open_offline in pcap - found
-- Looking for C++ include netinet/in.h
-- Looking for C++ include netinet/in.h - found
-- Looking for C++ include netinet/ip.h
-- Looking for C++ include netinet/ip.h - found
-- Looking for C++ include arpa/inet.h
-- Looking for C++ include arpa/inet.h - found
-- Looking for C++ include sys/socket.h
-- Looking for C++ include sys/socket.h - found
-- Looking for C++ include pcap.h
-- Looking for C++ include pcap.h - found
-- Looking for strnlen
-- Looking for strnlen - found
-- Configuring done
-- Generating done
-- Build files have been written to: /root/SEQ/test2/cmake

bonkersbobcat
12-20-2008, 07:35 PM
So did we ever get to a point were we could get a clean build on Ubuntu 8.10? (Either on the launchpad cmake version or on the sourceforge svn version?)

tanner
12-21-2008, 03:20 PM
So did we ever get to a point were we could get a clean build on Ubuntu 8.10? (Either on the launchpad cmake version or on the sourceforge svn version?)

Launchpad version builds clean for 8.04 and 8.10.

purple
12-22-2008, 03:25 PM
If anyone posts up the actual errors so we can get fixes in, we could get them in tarball. I think the last thing I did cleaning up qt usage by configure was for Ubuntu. But I don't have any idea if that was the whole problem or just part of it.

bonkersbobcat
12-22-2008, 03:57 PM
I got the svn version to build by removing all the doxygen stuff. For some reason it was hosing my autoconfig . I just be my particular machine. It has been through the beta upgrade to 8.04 and 8.10 followed by the production upgrades. (It is not a "clean" 8.10 install.)

The svn version has the incorrect function definitions containing duplicate "size" and "filter" parameters that seemed to be tolerated by the earlier version of the compiler, but not the version shipping with 8.10

I got the cmake stuff to build, but I had to hack up references to PKGDATADIR.

When I get some time I will try to set up a clean machine to test builds on.

purple
12-27-2008, 01:00 PM
I'd think you could remove the doxygen stuff completely. No one uses it.

tanner
01-25-2009, 05:07 PM
I've done additional work on the cmake build of showeq. This time for showeq-5.13.0.0, you can bzr branch it from here:

bzr branch lp:~showeq-team/showeq/cmake

Wanna help? Come check out the showeq-team on launchpad:

https://launchpad.net/~showeq-team

Build instructions(?)



$ cd /tmp
$ bzr branch lp:~showeq-team/showeq/cmake
Branched 18 revision(s). # Make sure it's revision 18
$ cmake .
-- Version: 5.13.0.0
-- DATA_INSTALL_DIR: /usr/local/share/showeq
-- PKGDATADIR: /usr/local/share/showeq # Did PKGDATADIR get set?
-- showeq is used as APPLICATION_NAME
-- Configuring done
-- Generating done
<snip>
$ make
<snip>
[100%] Building CXX object src/CMakeFiles/showeq.dir/mapicondialog.moc.o
Linking CXX executable showeq
[100%] Built target showeq

tanner
01-28-2009, 02:50 AM
I've added an answer on launchpad providing more details on building showeq via cmake, HOWTO build showeq using cmake (https://answers.launchpad.net/showeq/+question/58962/+index)

brainiac
02-12-2009, 02:34 PM
I was able to build showeq using cmake on OS X 10.5. Ran into some trouble getting the makefiles to work, but using cmake . -G Xcode to generate an xcode project file seemed to do the trick.

I only had the edit the source in one place (don't remember off the top of my head). I'll post more details later if anybody is interested

tanner
02-13-2009, 08:53 PM
That's cool that is compiles under OSX, does it actually work? Pretty sure it won't work under the old ppc systems, but probably will work under intel ones.

tanner
02-16-2009, 12:39 PM
Another cmake build update. This time for 5.13.1.0, please let me know if there are any issues.




$ cd /tmp
$ bzr branch lp:~showeq-team/showeq/cmake
Branched 19 revision(s). # Make sure it's revision 19
$ cmake .
-- Version: 5.13.1.0
-- DATA_INSTALL_DIR: /usr/local/share/showeq
-- PKGDATADIR: /usr/local/share/showeq # Did PKGDATADIR get set?
-- showeq is used as APPLICATION_NAME
-- Configuring done
-- Generating done
<snip>
$ make
<snip>
[100%] Building CXX object src/CMakeFiles/showeq.dir/mapicondialog.moc.o
Linking CXX executable showeq
[100%] Built target showeq


Looking for testers on non-debian bases systems. And Redhat, Fedora, Gentoo people?

tanner
02-18-2009, 11:58 AM
I'm pretty confident that the cmake build systems is stable enough to merge back into the upstream svn repository.

Should I submit patches for review?

Just push cmake into upstream (both cmake and autotools can live together)?

No one cares? :-)

Convince people to come try WoW? :-P

brainiac
02-18-2009, 03:33 PM
I like them, especially since I've never been able to get the autotools to work from the svn.

purple
02-19-2009, 10:45 PM
Replacing one build system we don't understand but that works with another that we don't understand probably isn't high on anyone's priority list, but submitting a diff won't hurt. It will have the most chance of being accepted if it is not a bunch of arcane nonsense like automake/autoconf is, or if there are clear reasons why switching accomplishes anything.

Please make sure the diff is clean and not full of other changes unrelated to the build changes. If I look at it and I can actually grok how it works (putting it a leg ahead of automake/autoconf) and the required package changes aren't too significant, maybe I'll work it in.