# Compiling/Porting volumeicon



## doa379 (Jul 13, 2014)

As a test example I am trying to compile the volumeicon package under *Free*BSD. Making throws errors.

http://softwarebakery.com/maato/volumeicon.html

`./configure --prefix=/usr/local --enable-oss`

Also:

`export CFLAGS="-I/usr/local/include -I/usr/include/sys"`

```
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... no
checking for cc... cc
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 cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking whether NLS is requested... yes
checking for intltool >= 0.23... 0.50.2 found
checking for intltool-update... /usr/local/bin/intltool-update
checking for intltool-merge... /usr/local/bin/intltool-merge
checking for intltool-extract... /usr/local/bin/intltool-extract
checking for xgettext... /usr/local/bin/xgettext
checking for msgmerge... /usr/local/bin/msgmerge
checking for msgfmt... /usr/local/bin/msgfmt
checking for gmsgfmt... /usr/local/bin/msgfmt
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.16.3
checking for XML::Parser... ok
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... no
configure: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: libintl.h: proceeding with the compiler's result
checking for libintl.h... yes
checking for ngettext in libc... no
checking for bindtextdomain in -lintl... no
checking if -liconv is needed to use gettext... 
checking for ngettext in -lintl... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK... yes
checking for X11... yes
checking soundcard.h usability... yes
checking soundcard.h presence... no
configure: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: soundcard.h: proceeding with the compiler's result
checking for soundcard.h... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating data/Makefile
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing po/stamp-it commands
```

`make` throws up errors:

```
Making all in src
cc -DPACKAGE_NAME=\"volumeicon\" -DPACKAGE_TARNAME=\"volumeicon\" -DPACKAGE_VERSION=\"0.5.0\" -DPACKAGE_STRING=\"volumeicon\ 0.5.0\" -DPACKAGE_BUGREPORT=\"http://www.softwarebakery.com/maato/volumeicon.html\" -DPACKAGE_URL=\"\" -DPACKAGE=\"volumeicon\" -DVERSION=\"0.5.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DRETSIGTYPE=void -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DGETTEXT_PACKAGE=\"volumeicon\" -DHAVE_LOCALE_H=1 -DHAVE_LC_MESSAGES=1 -DLOCALEDIR=\"/usr/local/share/locale\" -DDEFAULT_MIXERAPP=\"xterm\ -e\ \'alsamixer\'\" -I.     -Wall -DDATADIR=\"/usr/local/share/volumeicon\" -I/usr/local/include/gtk-3.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -D_THREAD_SAFE -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng15 -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/pango-1.0  -I/usr/local/include/freetype2 -I/usr/local/include/harfbuzz -I/usr/local/include/gio-unix-2.0/ -pthread -I/usr/local/include/glib-2.0 -I/usr/local/include    -DCOMPILEWITH_OSS -DOSS_HEADER=\"/usr/lib/oss/include/sys/soundcard.h\" -D_THREAD_SAFE -I/usr/local/include      -I/usr/local/include -I/usr/include/sys -MT bind.o -MD -MP -MF .deps/bind.Tpo -c -o bind.o bind.c
In file included from bind.c:28:
In file included from /usr/local/include/gtk-3.0/gtk/gtk.h:30:
In file included from /usr/local/include/gtk-3.0/gdk/gdk.h:30:
In file included from /usr/local/include/gtk-3.0/gdk/gdkconfig.h:13:
In file included from /usr/local/include/glib-2.0/glib.h:45:
/usr/local/include/glib-2.0/glib/gdate.h:273:51: warning: declaration of 'struct tm' will not be visible outside of this function [-Wvisibility]
                                           struct tm   *tm);
                                                  ^
In file included from bind.c:30:
In file included from /usr/local/include/gtk-3.0/gdk/gdkx.h:30:
/usr/local/include/X11/Xlib.h:1116:5: error: unknown type name 'wchar_t'
    wchar_t        *chars;
    ^
/usr/local/include/X11/Xlib.h:1275:2: error: unknown type name 'wchar_t'
        wchar_t *wide_char;
        ^
/usr/local/include/X11/Xlib.h:1309:2: error: unknown type name 'wchar_t'
        wchar_t *wcs;
        ^
/usr/local/include/X11/Xlib.h:3672:13: error: unknown type name 'wchar_t'
    _Xconst wchar_t*    /* text */,
            ^
/usr/local/include/X11/Xlib.h:3692:13: error: unknown type name 'wchar_t'
    _Xconst wchar_t*    /* text */,
            ^
/usr/local/include/X11/Xlib.h:3720:13: error: unknown type name 'wchar_t'
    _Xconst wchar_t*    /* text */,
            ^
/usr/local/include/X11/Xlib.h:3790:13: error: unknown type name 'wchar_t'
    _Xconst wchar_t*    /* text */,
            ^
/usr/local/include/X11/Xlib.h:3823:13: error: unknown type name 'wchar_t'
    _Xconst wchar_t*    /* text */,
            ^
/usr/local/include/X11/Xlib.h:3881:8: error: unknown type name 'wchar_t'
extern wchar_t *XwcResetIC(
       ^
/usr/local/include/X11/Xlib.h:3922:5: error: unknown type name 'wchar_t'
    wchar_t*            /* buffer_return */,
    ^
/usr/local/include/X11/Xlib.h:4001:5: error: unknown type name 'wchar_t'
    wchar_t *                   /* wstr */,
    ^
/usr/local/include/X11/Xlib.h:4013:5: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
    wchar_t                     /* wc */
    ^~~~~~~
In file included from bind.c:30:
In file included from /usr/local/include/gtk-3.0/gdk/gdkx.h:31:
/usr/local/include/X11/Xutil.h:755:5: error: unknown type name 'wchar_t'
    wchar_t**           list,
    ^
/usr/local/include/X11/Xutil.h:770:5: error: unknown type name 'wchar_t'
    wchar_t**           list
    ^
/usr/local/include/X11/Xutil.h:789:5: error: unknown type name 'wchar_t'
    wchar_t***          list_return,
    ^
2 warnings and 14 errors generated.
*** Error code 1

Stop.
make[1]: stopped in /home/jh/Downloads/volumeicon-0.5.0/src
*** Error code 1

Stop.
make: stopped in /home/jh/Downloads/volumeicon-0.5.0
```


----------



## acheron (Jul 14, 2014)

You probably miss an 
	
	



```
#include <stdlib.h>
```
 somewhere.


----------



## olivierd (Jul 19, 2014)

In your Makefile add this in USES macro:


```
USES= iconv:wchar_t
```


----------

