Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current git version fails to build on FreeBSD #397

Closed
willbprog127 opened this issue Nov 12, 2019 · 22 comments
Closed

Current git version fails to build on FreeBSD #397

willbprog127 opened this issue Nov 12, 2019 · 22 comments
Labels
bug The issue exposes a bug.

Comments

@willbprog127
Copy link

Greetings! 😁

I am attempting to build icewm (commit 5968d9f) on FreeBSD 12.1 (it uses clang by default).

I performed ./autogen.sh without issues. My configure command is:

./configure --disable-nls --disable-sm --disable-shape --disable-fribidi

The end of the configure output is:

Applications: icewm icewm-session icesh icewmhint icewmbg icehelp icesound icewm-menu-fdo
Image library: gdk-pixbuf-xlib-2.0 librsvg-2.0 libxpm
Audio support: ALSA OSS
Features: i18n xrandr xfreetype xinerama
Paths: PREFIX: /usr/local
       BINDIR: /usr/local/bin
       LOCDIR: /usr/local/share/locale
       LIBDIR: /usr/local/share/icewm
       CFGDIR: /usr/local/etc/icewm
       DOCDIR: /usr/local/share/doc/icewm
       MANDIR: /usr/local/share/man
       XTERMCMD: xterm

The build output is this:

$ make
make  all-recursive
Making all in src
  CXX      ymsgbox.o
  CXX      ydialog.o
  CXX      yurl.o
  CXX      wmsession.o
  CXX      wmwinlist.o
  CXX      wmtaskbar.o
In file included from wmtaskbar.cc:11:
In file included from ./yfull.h:4:
In file included from ./ykey.h:6:
/usr/local/include/X11/XKBlib.h:399:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17
      [-Wdeprecated-register]
    register KeySym *           /* sym_return */,
    ^~~~~~~~~
1 warning generated.
  CXX      wmwinmenu.o
  CXX      wmdialog.o
  CXX      wmabout.o
  CXX      wmswitch.o
  CXX      wmstatus.o
In file included from wmstatus.cc:10:
In file included from ./yfull.h:4:
In file included from ./ykey.h:6:
/usr/local/include/X11/XKBlib.h:399:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17
      [-Wdeprecated-register]
    register KeySym *           /* sym_return */,
    ^~~~~~~~~
1 warning generated.
  CXX      wmoption.o
  CXX      wmcontainer.o
  CXX      wmclient.o
In file included from wmclient.cc:7:
In file included from ./yfull.h:4:
In file included from ./ykey.h:6:
/usr/local/include/X11/XKBlib.h:399:5: warning: 'register' storage class specifier is deprecated and incompatible with C++17
      [-Wdeprecated-register]
    register KeySym *           /* sym_return */,
    ^~~~~~~~~
1 warning generated.
  CXX      wmmgr.o
wmmgr.cc:1386:13: error: use of undeclared identifier 'doActivate'
            doActivate = false;
            ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/will/Downloads/icewm-icewm-1-4-BRANCH/src
*** Error code 1

Stop.
make[1]: stopped in /usr/home/will/Downloads/icewm-icewm-1-4-BRANCH
*** Error code 1

Stop.
make: stopped in /usr/home/will/Downloads/icewm-icewm-1-4-BRANCH

The specific error line is:

wmmgr.cc:1386:13: error: use of undeclared identifier 'doActivate'
            doActivate = false;

I've also tried building the Release 1.4.2 code and it also fails with other errors.

My system info: ℹ️

  • FreeBSD 12.1 amd64
  • 'CC' is FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
  • 'C++' is FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)

Thanks! 👍

@gijsbers
Copy link
Collaborator

Commit db31ed4 should help you, but your system doesn't provide libSM + libICE development headers + libraries. Aren't these installable?

@willbprog127
Copy link
Author

Thanks :)

I updated and tried ./autogen.sh and got this at the top:

$ ./autogen.sh
Can't locate Date/Format.pm in @INC (you may need to install the Date::Format module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.30 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.30/mach /usr/local/lib/perl5/5.30).
BEGIN failed--compilation aborted.

This didn't happen before...

Thank you gijsbers :)

@willbprog127
Copy link
Author

It appears that ./autogen.sh did not fail completely. I was able to do my configure and build, until I received this during build:

  CXX      icesound.o
icesound.cc:221:5: error: unknown type name 'SF_INFO'
    SF_INFO sfinfo = {};
    ^
icesound.cc:222:5: error: unknown type name 'SNDFILE'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
    ^
icesound.cc:222:39: error: use of undeclared identifier 'SFM_READ'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
                                      ^
icesound.cc:326:5: error: unknown type name 'SF_INFO'
    SF_INFO sfinfo = {};
    ^
icesound.cc:327:5: error: unknown type name 'SNDFILE'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
    ^
icesound.cc:327:39: error: use of undeclared identifier 'SFM_READ'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
                                      ^
6 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/will/Downloads/icewm-git/icewm/src
*** Error code 1

Stop.
make[1]: stopped in /usr/home/will/Downloads/icewm-git/icewm
*** Error code 1

Stop.
make: stopped in /usr/home/will/Downloads/icewm-git/icewm

@gijsbers
Copy link
Collaborator

Date/Format.pm may be in package perl-TimeDate or so.
It looks like you haven't installed soundfile headers and libraries.
This may be in libsndfile.
You could also disable sound, or did you intent to use it?
Apparently sound is not disabled if libsndfile is absent.

@willbprog127
Copy link
Author

willbprog127 commented Nov 12, 2019

Thanks for your reply :-)

Date/Format.pm may be in package perl-TimeDate or so

I'm not finding any Perl modules that are close to that name. I'll keep looking.
EDIT: Found it, it was under 'p5' instead of 'perl' :-P

It looks like you haven't installed soundfile headers and libraries.

Just verified that they are installed. Shouldn't the configure script warn if it can't find them? The only warning I received during config is configure: WARNING: AO is not supported EDIT: Resolved by installing libao.

👍

@willbprog127
Copy link
Author

willbprog127 commented Nov 12, 2019

Apparently I was too hasty. I still couldn't get rid of the Perl error, but now have found the correct packages. On FreeBSD 12.1, these are the two packages to provide the necessary Perl functionality:

  • p5-DateTime-Format-DateManip
  • p5-DateTime-Format-DateParse

Thanks 😃

@gijsbers
Copy link
Collaborator

Could you perhaps give the concrete commands to install all required dependencies?

@willbprog127
Copy link
Author

Could you perhaps give the concrete commands to install all required dependencies?

The version of icewm in FreeBSD's repos is very old, but it seems to do what I want for the moment.

My plan is to make a FreeBSD virtual machine and try building the latest icewm on there, documenting which packages are needed. I'll post those notes here, if that's okay?

Thanks! 👍

@willbprog127
Copy link
Author

Here's the notes for trying to build the latest git icewm on a fresh FreeBSD install:

./autogen.sh
./autogen.sh: autoreconf: not found

pkg install automake autoconf m4

./autogen.sh

Can't exec "autopoint" ...
autoreconf-2.69: autopoint is needed because this package uses Gettext

Researched and found that autopoint is part of gettext.

pkg install gettext

./autogen.sh

Runs farther, but has errors about undefined macros toward the end. Looks like it needs libtool.

pkg install libtool

./autogen.sh

Runs through libtoolize then shows following error:

configure.ac:61: error: possibly undefined macro: AC_MSG_WARN...
configure.ac:85: error: possible undefined macro: AC_DEFINE
autoreconf-2.69: /usr/local/bin/autoreconf-2.69 failed with exit status: 1

Can't proceed further because I don't know what it wants now

Also, every time I run ./autogen.sh, the first line that appears says:

sed: 1: "configure.ac": command c expects \ followed by text

Thanks! :D

@gijsbers
Copy link
Collaborator

You need to install pkg-config for the dependency checking of configure to work.

If you run autogen.sh with the -x option then your shell will trace the commands and we may be able to better locate where the sed error occurs. Otherwise no clue.

@willbprog127
Copy link
Author

willbprog127 commented Nov 17, 2019

Thanks for the reply. I tried the -x option with ./autogen.sh, but the output didn't change from before.

Here are my continuing notes after installing 'pkgconf':

pkg install pkgconf

./autogen.sh

./autogen.sh ran all the way through successfully.

./configure --disable-nls --disable-i18n --disable-fribidi

configure: WARNING: ASCIIDOC ${SHELL} /root/Downloads/icewm-icewm-1-4-BRANCH/scripts/missing asciidoctor is not supported.
configure: WARNING: OSS is not supported
configure: WARNING: No valid sound interface, not building icesound.

pkg install libsndfile libao asciidoc

./configure --disable-nls --disable-i18n --disable-fribidi

Configure ran all the way through without warnings.

make

Errors as before:

  CXX      icesound.o
icesound.cc:221:5: error: unknown type name 'SF_INFO'
    SF_INFO sfinfo = {};
    ^
icesound.cc:222:5: error: unknown type name 'SNDFILE'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
    ^
icesound.cc:222:39: error: use of undeclared identifier 'SFM_READ'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
                                      ^
icesound.cc:326:5: error: unknown type name 'SF_INFO'
    SF_INFO sfinfo = {};
    ^
icesound.cc:327:5: error: unknown type name 'SNDFILE'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
    ^
icesound.cc:327:39: error: use of undeclared identifier 'SFM_READ'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
                                      ^
icesound.cc:489:5: error: unknown type name 'SF_INFO'
    SF_INFO sfinfo = {};
    ^
icesound.cc:490:5: error: unknown type name 'SNDFILE'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
    ^
icesound.cc:490:39: error: use of undeclared identifier 'SFM_READ'
    SNDFILE* sf = sf_open(samplefile, SFM_READ, &sfinfo);
                                      ^
9 errors generated.
*** Error code 1

build-output.txt

@bbidulock
Copy link
Owner

It says:

configure: WARNING: No valid sound interface, not building icesound.

and then goes ahead and tries to build it:

CXX      icesound.o

That's an error in configure.ac and Makefile.am

@bbidulock bbidulock added the bug The issue exposes a bug. label Nov 17, 2019
@gijsbers
Copy link
Collaborator

Could you give the output of:

grep -e SND -e OSS -e ALSA -e AO -e AUDIO -e SOUND config.log

@willbprog127
Copy link
Author

Certainly!

$ grep -e SND -e OSS -e ALSA -e AO -e AUDIO -e SOUND config.log

| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
| #define HAVE_SYS_SOUNDCARD_H 1
configure:22822: checking for ALSA
configure:22903: checking for AO
configure:22984: checking for OSS
configure:26919: result: Audio support: ALSA AO OSS
ac_cv_env_ALSA_CFLAGS_set=''
ac_cv_env_ALSA_CFLAGS_value=''
ac_cv_env_ALSA_LIBS_set=''
ac_cv_env_ALSA_LIBS_value=''
ac_cv_env_AO_CFLAGS_set=''
ac_cv_env_AO_CFLAGS_value=''
ac_cv_env_AO_LIBS_set=''
ac_cv_env_AO_LIBS_value=''
ac_cv_env_OSS_CFLAGS_set=''
ac_cv_env_OSS_CFLAGS_value=''
ac_cv_env_OSS_LIBS_set=''
ac_cv_env_OSS_LIBS_value=''
pkg_cv_ALSA_CFLAGS='-I/usr/local/include -I/usr/local/include/alsa '
pkg_cv_ALSA_LIBS='-L/usr/local/lib -lsndfile -lasound '
pkg_cv_AO_CFLAGS='-I/usr/local/include '
pkg_cv_AO_LIBS='-L/usr/local/lib -lsndfile -lao '
pkg_cv_OSS_CFLAGS='-I/usr/local/include '
pkg_cv_OSS_LIBS='-L/usr/local/lib -lsndfile '
ALSA_CFLAGS='-I/usr/local/include -I/usr/local/include/alsa '
ALSA_LIBS='-L/usr/local/lib -lsndfile -lasound '
AO_CFLAGS='-I/usr/local/include '
AO_LIBS='-L/usr/local/lib -lsndfile -lao '
AUDIO_CFLAGS=' -I/usr/local/include -I/usr/local/include/alsa  -I/usr/local/include  -I/usr/local/include '
AUDIO_LIBS=' -L/usr/local/lib -lsndfile -lasound  -L/usr/local/lib -lsndfile -lao  -L/usr/local/lib -lsndfile '
BUILD_SOUND_FALSE='#'
BUILD_SOUND_TRUE=''
OSS_CFLAGS='-I/usr/local/include '
OSS_LIBS='-L/usr/local/lib -lsndfile '
#define HAVE_SYS_SOUNDCARD_H 1
#define ENABLE_ALSA 1
#define ENABLE_AO 1
#define ENABLE_OSS 1

@gijsbers
Copy link
Collaborator

Thank you! Another test:
Could you configure and grep like this:

 |& grep -i -e audio -e CONFIG_ALSA -e CONFIG_AO -e CONFIG_OSS

@willbprog127
Copy link
Author

👍

$ ./configure --disable-nls --disable-i18n --disable-fribidi |& grep -i -e audio -e CONFIG_ALSA -e CONFIG_AO -e CONFIG_OSS
Audio support: ALSA AO OSS

@gijsbers
Copy link
Collaborator

Sorry I forgot to mention you need to start configure with the -x option like bash -x ./configure

@willbprog127
Copy link
Author

willbprog127 commented Nov 17, 2019

Here it is:

$ sh -x ./configure --disable-nls --disable-i18n --disable-fribidi | & grep -i -e audio -e CONFIG_ALSA -e CONFIG_AO -e CONFIG_OSS

AUDIO_LIBS
AUDIO_CFLAGS
+ AUDIO_CFLAGS=' -I/usr/local/include -I/usr/local/include/alsa '
+ AUDIO_LIBS=' -L/usr/local/lib -lsndfile -lasound '
+ CONFIG_ALSA=yes
+ AUDIO_CFLAGS=' -I/usr/local/include -I/usr/local/include/alsa  -I/usr/local/include '
+ AUDIO_LIBS=' -L/usr/local/lib -lsndfile -lasound  -L/usr/local/lib -lsndfile -lao '
+ CONFIG_AO=yes
+ AUDIO_CFLAGS=' -I/usr/local/include -I/usr/local/include/alsa  -I/usr/local/include  -I/usr/local/include '
+ AUDIO_LIBS=' -L/usr/local/lib -lsndfile -lasound  -L/usr/local/lib -lsndfile -lao  -L/usr/local/lib -lsndfile '
+ CONFIG_OSS=yes
+ eval 'test "$CONFIG_ALSA" = yes'
+ audio_support=' ALSA'
+ eval 'test "$CONFIG_AO" = yes'
+ audio_support=' ALSA AO'
+ eval 'test "$CONFIG_OSS" = yes'
+ audio_support=' ALSA AO OSS'
+ eval 'ac_val=$AUDIO_CFLAGS'
+ eval 'ac_val=$AUDIO_LIBS'
+ eval 'ac_val=$CONFIG_ALSA'
+ eval 'ac_val=$CONFIG_AO'
+ eval 'ac_val=$CONFIG_OSS'
AUDIO_LIBS
AUDIO_CFLAGS
+ eval 'ac_val=$audio_support'
AUDIO_LIBS
AUDIO_CFLAGS
AUDIO_LIBS
AUDIO_CFLAGS
+ printf '%s\n' 'configure:26919: result: Audio support: ALSA AO OSS'
+ printf '%s\n' 'Audio support: ALSA AO OSS'
Audio support: ALSA AO OSS
+ eval 'ac_val=$AUDIO_CFLAGS'
+ eval 'ac_val=$AUDIO_LIBS'
+ eval 'ac_val=$CONFIG_ALSA'
+ eval 'ac_val=$CONFIG_AO'
+ eval 'ac_val=$CONFIG_OSS'
AUDIO_LIBS
AUDIO_CFLAGS
+ eval 'ac_val=$audio_support'
+ eval 'ac_val=$AUDIO_LIBS'
+ printf '%s\n' $'AUDIO_LIBS=\' -L/usr/local/lib -lsndfile -lasound  -L/usr/local/lib -lsndfile -lao  -L/usr/local/lib -lsndfile \''
+ eval 'ac_val=$AUDIO_CFLAGS'
+ printf '%s\n' $'AUDIO_CFLAGS=\' -I/usr/local/include -I/usr/local/include/alsa  -I/usr/local/include  -I/usr/local/include \''

@gijsbers
Copy link
Collaborator

This is simpler and hopefully more robust for your system. If you have a supported sound system then it should never print "No valid sound interface, not building icesound." again.

@willbprog127
Copy link
Author

Great! Thanks so much! 👍

Now when I build, I get this error:

  CXXLD    genpref
  GEN      preferences
Making all in po
Making all in doc
make[2]: don't know how to make %.html:. Stop

make[2]: stopped in ~/Downloads/icewm/doc
*** Error code 1

Stop.
make[1]: stopped in ~/Downloads/icewm
*** Error code 1

Stop.
make: stopped in ~/Downloads/icewm

@gijsbers
Copy link
Collaborator

Is asciidoc and/or asciidoctor installed?
Is there a gnu make you could use?
Otherwise try make -k and see if this is the only thing that fails.
Or try touch doc/icewm.html.

@willbprog127
Copy link
Author

Yes, asciidoc is installed. I ended up installing gmake and everything built properly without needing to do the touch command. Yay! 🎉

So here is what should be installed on FreeBSD 12.1, beyond the standard xorg package, for icewm to build and work:

$ pkg install automake autoconf m4 gettext libtool pkgconf libsndfile libao asciidoc gmake p5-DateTime-Format-DateManip p5-DateTime-Format-DateParse

Thank you so much guys! I really appreciate it! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue exposes a bug.
Projects
None yet
Development

No branches or pull requests

3 participants