Hi,
I'm trying to build fltk on Fedora with mingw32. Here's the spec I'm using
for rpmbuild:
%global _use_internal_dependency_generator 0
%global __find_requires %{_mingw32_findrequires}
%global __find_provides %{_mingw32_findprovides}
Name: mingw32-fltk
Version: 1.1.10
Release: 1%{?dist}
Summary: MinGW Windows port of Fast Light Tool Kit
License: LGPLv2+
Group: Development/Libraries
URL: http://www.fltk.org/
Source0:
http://ftp.easysw.com/pub/fltk/%{version}/fltk-%{version}-source.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u}
-n)
BuildArch: noarch
BuildRequires: mingw32-binutils
BuildRequires: mingw32-cpp
BuildRequires: mingw32-filesystem >= 63
BuildRequires: mingw32-gcc
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-w32api
%description
%prep
%setup -q -n fltk-%{version}
%build
%{_mingw32_configure} --disable-shared --enable-threads
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING
%{_mingw32_bindir}/*
%{_mingw32_libdir}/*
%{_mingw32_datadir}/*
%{_mingw32_includedir}/*
%changelog
* Sat Mar 05 2011 Olavi Ourson <ourson77 at googlemail dot com> 1.1.10-1
- Initial RPM release.
When running rpmbuild -bc mingw32-fltk.spec configure goes fine and jpeg,
png and z get built ok. When it starts to compile fltk source, I get the
following errors:
=== making src ===
Compiling Fl.cxx...
In file included from /usr/include/sys/select.h:46:0,
from /usr/include/sys/types.h:220,
from /usr/include/stdlib.h:320,
from
/usr/i686-pc-mingw32/sys-root/mingw/include/objbase.h:12,
from /usr/i686-pc-mingw32/sys-root/mingw/include/ole2.h:9,
from
/usr/i686-pc-mingw32/sys-root/mingw/include/windows.h:114,
from ../FL/win32.H:36,
from ../FL/x.H:39,
from Fl.cxx:35:
/usr/include/bits/time.h:75:8: error: redefinition of 'struct timeval'
/usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:109:16: error:
previous definition of 'struct timeval'
In file included from /usr/include/sys/types.h:220:0,
from /usr/include/stdlib.h:320,
from
/usr/i686-pc-mingw32/sys-root/mingw/include/objbase.h:12,
from /usr/i686-pc-mingw32/sys-root/mingw/include/ole2.h:9,
from
/usr/i686-pc-mingw32/sys-root/mingw/include/windows.h:114,
from ../FL/win32.H:36,
from ../FL/x.H:39,
from Fl.cxx:35:
/usr/include/sys/select.h:78:5: error: conflicting declaration 'typedef
struct fd_set fd_set'
/usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:64:3: error: 'fd_set'
has a previous declaration as 'typedef struct fd_set fd_set'
/usr/include/sys/select.h:112:42: error: declaration of C function 'int
select(int, fd_set*, fd_set*, fd_set*, timeval*)' conflicts with
/usr/i686-pc-mingw32/sys-root/mingw/include/winsock2.h:632:32: error:
previous declaration 'int select(int, fd_set*, fd_set*, fd_set*, const
timeval*)' here
Fl.cxx: In static member function 'static int Fl::handle(int, Fl_Window*)':
Fl.cxx:719:46: warning: suggest parentheses around '&&' within '||'
In file included from Fl.cxx:1216:0:
Fl_win32.cxx: In static member function 'static void Fl::add_fd(int, int,
void (*)(int, void*), void*)':
Fl_win32.cxx:189:24: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx:190:25: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx:191:25: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx: In static member function 'static void Fl::remove_fd(int,
int)':
Fl_win32.cxx:219:24: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx:220:25: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx:221:25: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx: In function 'int fl_wait(double)':
Fl_win32.cxx:278:6: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx:279:6: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx:280:6: error: 'struct fd_set' has no member named '__fds_bits'
Fl_win32.cxx: In member function 'void NameList::add_name(const char*)':
Fl_win32.cxx:1209:29: error: '_strdup' was not declared in this scope
make[1]: *** [Fl.o] Error 1
make: *** [all] Error 1
Any ideas how to get this to work?
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev