Opened 11 years ago

Closed 11 years ago

#11629 closed defect (fixed)

Cygwin 1.7 build broken

Reported by: vadz Owned by:
Priority: normal Milestone: 3.0.0
Component: wxMSW Version: stable-latest
Keywords: cygwin cygwin_1.7 Cc:
Blocked By: #11626, #11626, #11626, #11626, #11626, #11716, #11716, #11716, #11716, #11716, #11717, #11717 Blocking:
Patch: no

Description

Currently wxMSW doesn't build with Cygwin 1.7. I'm not personally interested in fixing this but it would be nice if someone could do it before 2.9.1 or at least 3.0 release.

Main problems are incompatibility of <winsock.h> with Cygwin as well as many Unicode issues. We need to find out if we can use Unicode with 1.7 (it didn't work with 1.5) at all.

We should also avoid using deprecated Cygwin functions such as cygwin_conv_to_full_win32_path().

Once again, volunteers/maintainers for wxMSW/Cygwin platform very welcome.

Attachments (1)

11629.txt download (1.7 KB) - added by austin987 11 years ago.
patch

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by austin987

patch

comment:1 Changed 11 years ago by austin987

  • Blocked By 11716 added

comment:2 Changed 11 years ago by austin987

  • Blocked By 11717 added

comment:3 Changed 11 years ago by rafuck

  • Blocked By

(In #11626) All sources will successfully compiled after two actions:
(1) remove /usr/include/sys/select.h (or rename it to select.h-x for example)
(2) change 103-th line in src/common/stopwatch.cpp
-#define wxGetTimeOfDay(tv, tz) gettimeofday(tv)
+#define wxGetTimeOfDay(tv, tz) gettimeofday((tv), NULL)

My system is WinXP with all updates. Cygwin version is 1.7.5
$gcc --version
gcc (GCC) 4.3.4 20090804 (release) 1
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

comment:4 Changed 11 years ago by vadz

  • Blocked By

(In #11626) Thanks for the workaround but this is not a real solution, we can't recommend people to rename or remove standard headers.

For wxGetTimeOfDay() it should normally already work in wx svn trunk as we do use 2 parameters unless WX_GETTIMEOFDAY_NO_TZ is defined.

comment:5 Changed 11 years ago by vadz

  • Blocked By

comment:6 Changed 11 years ago by vadz

  • Keywords cygwin cygwin_1.7 added

comment:7 Changed 11 years ago by vadz

  • Blocked By

(In #11626) This should be fixed by r65057, please reopen if any problems persist or open new tickets for the new problems.

comment:8 Changed 11 years ago by vadz

  • Resolution set to fixed
  • Status changed from new to closed

It seems like this one should be fixed too, at least I don't see any other problems here.

comment:9 Changed 10 years ago by vadz

  • Blocked By

(In #11716) Sorry, I don't understand this patch. sys/_default_fcntl.h is already included from the public sys/fcntl.h header which in turn is included by fcntl.h and this one is already included from tiffiop.h if HAVE_FCNTL_H is defined -- which it should be.

Could you please check if it's defined for you and if not, why? I.e. why did configure fail to find this header?

comment:10 Changed 10 years ago by vadz

  • Blocked By

(In #11717) This should have been fixed by r65057 as well.

comment:11 Changed 10 years ago by austin987

  • Blocked By

(In #11716) I no longer have access to the machine I was compiling on before, so I made a new checkout of svn. Using the Cywgwin wiki guide (http://wiki.wxwidgets.org/Cygwin), configure fails for me:
configure:25233: error: Can't use --enable-std_string without std::wstring or std::basic_string<wchar_t>

configure was invoked with '--with-msw --enable-debug --enable-debug_gdb --disable-shared'.

If I add in --disable-std_string, configure completes. Running make then fails, with:
./src/stc/scintilla/src/Editor.cxx:13:18: string: No such file or directory
In file included from ./include/wx/filefn.h:16,

from ./include/wx/utils.h:21,
from ./include/wx/vector.h:31,
from ./src/stc/scintilla/src/Selection.h:134,
from ./src/stc/scintilla/src/Editor.cxx:41:

./include/wx/arrstr.h:117:24: iterator: No such file or directory
In file included from ./include/wx/filefn.h:16,

from ./include/wx/utils.h:21,
from ./include/wx/vector.h:31,
from ./src/stc/scintilla/src/Selection.h:134,
from ./src/stc/scintilla/src/Editor.cxx:41:

./include/wx/arrstr.h: In member function `void wxArrayString::assign(Iterator, Iterator)':
./include/wx/arrstr.h:301: error: distance' is not a member of std'
In file included from ./src/stc/scintilla/src/Selection.h:134,

from ./src/stc/scintilla/src/Editor.cxx:41:

./include/wx/vector.h:37:36: new: No such file or directory

I'd be happy to retest this bug, if someone can point out what's needed to get it to compile on cygwin.

comment:12 Changed 10 years ago by vadz

  • Blocked By

(In #11716) The error in Editor.cxx could be worked around by avoiding the use of std::string here but I don't know if we want to modify this file. Robin, do you think we can modify this code and, if so, should we submit it to the upstream? (This question was the only reason I cc'd you this bug, please feel free to ignore the rest).

Of course, it's strange that the test for std::basic_string<wchar_t> fails in the first place, it passes here. Could you please look at the relevant part of config.log to see why does it fail? What version of Cygwin/gcc/libstdc++ do you have? It seems like it's something really ancient because <iterator> header is present even in Cygwin g++ 3.4.

BTW, wiki instructions seem strange to me, --with-msw is the default, --enable-debug_gdb should produce huge libraries (all this extra debug information) and I don't know why should --disable-shared be used.

comment:13 Changed 10 years ago by austin987

  • Blocked By

(In #11716) Cygwin 1.7.7
g++ 3.4.4

I'm attaching config.log, but relevant portion is:

configure:25160: checking if std::basic_string<wchar_t> works

configure:25200: g++ -c conftest.cpp >&5
conftest.cpp:49:38: string: No such file or directory
conftest.cpp: In function `int main()':
conftest.cpp:54: error: basic_string' is not a member of std'
conftest.cpp:54: error: expected primary-expression before "wchar_t"
conftest.cpp:54: error: expected `;' before "wchar_t"
conftest.cpp:55: error: `foo' undeclared (first use this function)
conftest.cpp:55: error: (Each undeclared identifier is reported only once for each function it appears in.)
configure:25206: $? = 1

(This was invoking configure with no options).

Note: See TracTickets for help on using tickets.