Project

General

Profile

Current compiling issues

Added by Canadian Bacon over 9 years ago

Seems there is a little issue with compiling Audacious using the msys2 environment, looks like it's not finding iconv at configure time, regardless if I manually set the CFLAGS parameters to search for the headers (error below).

charset.cc:1:0: warning: -fPIC ignored for target (all code is position independent)
 /*
 ^
charset.cc: In function 'StringBuf str_convert(const char*, int, const char*, const char*)':
charset.cc:56:5: error: 'ICONV_CONST' was not declared in this scope
     ICONV_CONST char * in = (ICONV_CONST char *) str;
     ^
charset.cc:60:33: error: 'in' was not declared in this scope
     size_t ret = iconv (conv, & in, & inbytesleft, & out, & outbytesleft);
                                 ^
Failed to compile charset.cc (lib)!
../../buildsys.mk:406: recipe for target 'charset.lib.o' failed
make[5]: *** [charset.lib.o] Error 1
../../buildsys.mk:116: recipe for target 'all' failed
make[4]: *** [all] Error 2
../buildsys.mk:123: recipe for target 'libaudcore' failed
make[3]: *** [libaudcore] Error 2
../buildsys.mk:116: recipe for target 'all' failed
make[2]: *** [all] Error 2
buildsys.mk:123: recipe for target 'src' failed
make[1]: *** [src] Error 2
buildsys.mk:116: recipe for target 'all' failed
make: *** [all] Error 2

Another thing, seems build type defaults to i686 perhaps better to have the build set to -march=native instead possibly.


Replies (8)

RE: Current compiling issues - Added by John Lindgren over 9 years ago

Did you follow the instructions exactly?

RE: Current compiling issues - Added by Canadian Bacon over 9 years ago

I use prebuilt binaries of my dev libs from the msys2/mingw64 (https://sf.net/projects/msys2 for those interested) pacman repository. As far as I am concerned, it should be as simple as doing a ./configure --prefix=/opt/audacious-win32 --disable-dbus --enable-qt --disable-gtk one the required development libraries are installed..

RE: Current compiling issues - Added by John Lindgren over 9 years ago

The only supported method of compiling Audacious on Win32 is to follow the instructions we provide. Otherwise, good luck, you're on your own.

RE: Current compiling issues - Added by Canadian Bacon over 9 years ago

I refuse to believe that's the only supported method. It's a complete setup that provides mingw-w64 both 32bit and 64bit with precompiled dev packages. That's including bash, autotools, gtk 2 and 3 plus qt4-5. If I work on a patch that doesn't break the "Suggested" Build instructions but allows to be used on the msys2 environment, would you be willing to look into it and possibly accepting said patch?

RE: Current compiling issues - Added by John Lindgren over 9 years ago

I'm always willing to look at patches, but I doubt that this is a problem you can patch over in Audacious. ICONV_CONST is a #define that's supposed to be added to config.h by the AM_ICONV macro in configure.ac. So you're probably looking at a problem in your autotools and/or iconv installation.

RE: Current compiling issues - Added by Carlo Bramini over 9 years ago

I do not know if it is related directly to this problem, but me too I noticed the "-fPIC" warning, but only when --enable-qt option is provided.
Actually, the COFF-PE executables (so CYGWIN and MinGW are included) do not support that.
acinclude.m4 adds this option without any check on the platform.
Perhaps it would be better to add some checks on the $host_os or to handle QT_CFLAGS inside m4/buildsys.m4 (where these checks already exists).
Question: somehow shouldn't the -fPIC option be handled by pkg-config, if it is required?

RE: Current compiling issues - Added by John Lindgren over 9 years ago

I haven't had time yet to work out any issues with the Qt UI on Windows. For the time being, GTK2 is the only supported/tested toolkit for that platform. The Qt headers complain if we compile without "-fPIC" on Linux, but quite possibly that option isn't appropriate on Windows.

    (1-8/8)