cebix / psximager

Tools for dumping and mastering PlayStation 1 ("PSX") CD-ROM images
GNU General Public License v2.0
156 stars 26 forks source link

Unable to build on Ubuntu 20.04 #12

Closed tetracorp closed 3 months ago

tetracorp commented 3 years ago

I'm attempting to build psximager on Ubuntu 20.04 but it's not working.

First I install the dependencies, which all meet the version requirements given in INSTALL:

$ sudo apt-get install libboost-all-dev libcdio-dev libiso9660-dev libvcdinfo-dev autoconf build-essential
$ ./bootstrap
$ ./configure

But configure fails:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... no
checking for c++... c++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of c++... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBCDIO... yes
checking for LIBISO9660... yes
checking for LIBVCDINFO... yes
checking for boostlib >= 1.50.0... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking whether the Boost::Filesystem library is available... yes
configure: error: Could not find a version of the library!

That last line it's stalling on is on line 4893 of configure. I can get it to configure with this:

./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu/

But then make fails:

Making all in src
make[1]: Entering directory '/home/tetracorp/psximager/psximager-2.0/src'
c++ -DPACKAGE_NAME=\"PSXImager\" -DPACKAGE_TARNAME=\"psximager\" -DPACKAGE_VERSION=\"2.0\" -DPACKAGE_STRING=\"PSXImager\ 2.0\" -DPACKAGE_BUGREPORT=\"cb@cebix.net\" -DPACKAGE_URL=\"\" -DPACKAGE=\"psximager\" -DVERSION=\"2.0\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_FILESYSTEM=/\*\*/ -DHAVE_BOOST_REGEX=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -I.       -g -O2 -MT psxrip.o -MD -MP -MF .deps/psxrip.Tpo -c -o psxrip.o psxrip.cpp
psxrip.cpp:110:25: error: no matching function for call to 'iso9660_fs_readdir'
        CdioList_t * entries = iso9660_fs_readdir(image, inputPath.c_str(), false);
                               ^~~~~~~~~~~~~~~~~~
/usr/include/cdio/iso9660.h:1060:14: note: candidate function not viable: requires 2 arguments, but 3 were provided
CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[]);
             ^
psxrip.cpp:230:2: error: no matching function for call to '_cdio_list_free'
        _cdio_list_free(entries, true);
        ^~~~~~~~~~~~~~~
/usr/include/cdio/ds.h:46:6: note: candidate function not viable: requires 3 arguments, but 2 were provided
void _cdio_list_free (CdioList_t *p_list, int free_data, CdioDataFree_t free_fn);
     ^
psxrip.cpp:300:25: error: no matching function for call to 'iso9660_fs_readdir'
        CdioList_t * entries = iso9660_fs_readdir(image, inputPath.c_str(), false);
                               ^~~~~~~~~~~~~~~~~~
/usr/include/cdio/iso9660.h:1060:14: note: candidate function not viable: requires 2 arguments, but 3 were provided
CdioList_t * iso9660_fs_readdir (CdIo_t *p_cdio, const char psz_path[]);
             ^
3 errors generated.
make[1]: *** [Makefile:402: psxrip.o] Error 1
make[1]: Leaving directory '/home/tetracorp/psximager/psximager-2.0/src'
make: *** [Makefile:358: all-recursive] Error 1
ike9000e commented 3 years ago

About the errors on wrong number of function arguments. They are in libcdio and these function had changed since libcdio-0.90. Seems you're compiling with newer libcdio version than is supported.

I managed to compile successfully with libcdio-2.1.0 just by patching psximager source files these calls are in. It seems straightforward, just compare old with new sources in the libcdio library, Like in the error log, names of functions are: "iso9660_fs_readdir" and "_cdio_list_free". Looks like this happens only in "psxrip.cpp", and the other two tools are OK.

It would be good if the original author of this tool came up and released new version with libcdio-2.1.0 compatibility.

cebix commented 3 months ago

Builds fine with libcdio 2.x since 53417bd. Prerequisite checks have been fixed with e689b00. OC probably used an older version of libcdio.