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

libxputty/xputty/header/xwidget-platform.h:84:1: error: unknown type name 'Display' #56

Open
yurivict opened this issue Mar 24, 2024 · 7 comments

Comments

@yurivict
Copy link

Build fails:

c++: warning: optimization flag '-fstrength-reduce' is not supported [-Wignored-optimization-argument]
c++: warning: optimization flag '-fschedule-insns' is not supported [-Wignored-optimization-argument]
In file included from MidiKeyBoard.cpp:22:
In file included from ./MidiKeyBoard.h:55:
In file included from /usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidgets.h:40:
In file included from /usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/widgets/xbutton.h:26:
In file included from /usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xputty.h:200:
In file included from /usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget.h:34:
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:84:1: error: unknown type name 'Display'
   84 | Display *os_open_display(char *display_name);
      | ^
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:91:23: error: unknown type name 'Display'
   91 | void os_close_display(Display *dpy);
      |                       ^
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:101:1: error: unknown type name 'Window'
  101 | Window os_get_root_window(Xputty *main, int flag);
      | ^
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:119:39: error: unknown type name 'Window'
  119 | void os_translate_coords(Widget_t *w, Window from_window, Window to_window,
      |                                       ^
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:119:59: error: unknown type name 'Window'
  119 | void os_translate_coords(Widget_t *w, Window from_window, Window to_window,
      |                                                           ^
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:147:21: error: unknown type name 'Display'
  147 | void os_move_window(Display *dpy, Widget_t *w, int x, int y);
      |                     ^
/usr/ports/audio/mamba/work/Mamba-2.6/libxputty/xputty/header/xwidget-platform.h:156:23: error: unknown type name 'Display'

Version: 2.6
FreeBSD 14.0

@brummer10
Copy link
Owner

Hi @yurivict

Hopefully that is fixed now with the latest commit. Let me know please if it works now for BSD/clang.

@yurivict
Copy link
Author

The build of the last tag 3a814f5 fails:

===>  Building for mamba-2.6
for         
with        cc
using       gold
and         xxd -i
gmake[1]: warning: -j1 forced in submake: resetting jobserver mode.
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
cat: /proc/cpuinfo: No such file or directory
 Building object file build/MidiKeyBoard.o 
c++: warning: optimization flag '-fstrength-reduce' is not supported [-Wignored-optimization-argument]
c++: warning: optimization flag '-fschedule-insns' is not supported [-Wignored-optimization-argument]
In file included from MidiKeyBoard.cpp:22:
./MidiKeyBoard.h:55:10: fatal error: 'xwidgets.h' file not found
   55 | #include "xwidgets.h"
      |          ^~~~~~~~~~~~
1 error generated.
gmake[1]: *** [Makefile:156: build/MidiKeyBoard.o] Error 1

@yurivict
Copy link
Author

After adding a few include paths, it fails to find the header:

In file included from MidiKeyBoard.cpp:22:
In file included from ./MidiKeyBoard.h:55:
In file included from /usr/ports/audio/mamba/work/Mamba-3a814f5/libxputty/xputty/header/xwidgets.h:40:
In file included from /usr/ports/audio/mamba/work/Mamba-3a814f5/libxputty/xputty/header/widgets/xbutton.h:26:
In file included from /usr/ports/audio/mamba/work/Mamba-3a814f5/libxputty/xputty/header/xputty.h:210:
/usr/ports/audio/mamba/work/Mamba-3a814f5/libxputty/xputty/header/xpngloader.h:109:10: fatal error: 'xresources.h' file not found
  109 | #include "xresources.h"
      |          ^~~~~~~~~~~~~~
1 error generated.

xresources.h isn't in the source tree.

@yurivict
Copy link
Author

These include paths were missing:

CXXFLAGS+=      -I${WRKSRC}/libxputty/xputty/header \
                -I${WRKSRC}/libxputty/xputty/header/widgets

brummer10 added a commit that referenced this issue Apr 21, 2024
@brummer10
Copy link
Owner

for
with cc
using gold
and xxd -i

That's the issue, it should read
for FreeBSD
to set the needed flags and include path. I've pushed a Fix for it now, please check if the last commit works now for you.

@yurivict
Copy link
Author

The revision 4b6bd9c fails:

===>  Building for mamba-2.5
Makefile:2: libxputty/Build/Makefile.base: No such file or directory
gmake: *** No rule to make target 'libxputty/Build/Makefile.base'.  Stop.

@brummer10
Copy link
Owner

you must run
git submodule update --init --recursive
before make.

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

No branches or pull requests

2 participants