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

Build process on MSYS #95

Closed
masatake opened this issue Oct 22, 2014 · 23 comments
Closed

Build process on MSYS #95

masatake opened this issue Oct 22, 2014 · 23 comments

Comments

@masatake
Copy link
Member

@ffes, I would like to fix the issue you wrote in f-wndows.rst.

I need to see config.status, config.h and the output of make.
I'm not sure these files can be attached to this comment area.
If they cannot, could you send them to me, yamato@redhat.com?

@ffes
Copy link
Member

ffes commented Oct 22, 2014

I will do that tonight (EU time)

@ffes
Copy link
Member

ffes commented Oct 22, 2014

I have tested various system as described in f-windows.rst. Note that #97 is required to let mingw-w64 work.

Using ./configure in any windows environment results in a .exe but it doesn't work properly.
I still have to investigate what goes wrong. The output of ctags --verbose is included in one of the zips.

Using mk_mingw.mak generates a proper working ctags.exe, even when cross-compiled from Ubuntu. To cross-compile from Ubuntu all I did was apt-get install mingw-w64 and make -f mk_mingw.mak CC=i686-w64-mingw32-gcc.

@masatake I will mail you some zips with the files you requested.

@masatake
Copy link
Member Author

Could you try fix-msys-build branch of masatake/ctags?

I've tried to enable both gnu_regex and fnmatch.
$ autoreconf
$ ./configure
$ make
then try
$ ./ctags --list-feathres
My expectation is that wildcards and regex are printed.

@ffes
Copy link
Member

ffes commented Oct 26, 2014

I run into a problem.

Your branch itself does compile but doesn't have the --list-features option. It also doesn't seem to add regex and fnmatch to the exe.

Therefore I merged your branch into fishman/master, but that gives compile error trying to compile. I will mail you the output files.

I got similar results when I cross-compile with cygwin.

@ffes
Copy link
Member

ffes commented Oct 26, 2014

Did some more testing. Manually adding -D__USE_GNU to the Makefile solves the compilation problems.

This is the result. No wildcards or regex in the output.

$ ./ctags --list-features
win32
wildcards
$

@ffes
Copy link
Member

ffes commented Oct 26, 2014

When I build using make -f mk_mingw.mak this is the output of ctags --list-features

$ ./ctags.exe --list-features
win32
wildcards
regex
internal-sort
$

@masatake
Copy link
Member Author

Very strange.

There was a typo: s/--list-feathres/--list-features/.

I cannot understand why there is no --list-features option.
It must be always avaiable.

We have to make this clear fist of all.

@masatake
Copy link
Member Author

I would like to solve regex first. Then I work on fnmatch.

https://gcc.gnu.org/ml/fortran/2005-10/msg00365.html
It seems that generally __USE_GNU should not be defined in applications code.
However it is needed in compiling bundled gnu_regex.
If I add -D__USE_GNU to CPPFLAGS in configre.ac, it affects all *.c in compiling.
So instead of doing it in configure.ac, I did it in Makefile.in.
(I think we can expect GNU Make.)

Though I have no runtime environment I tried cross-compiling. New code is cross-compiled well.
http://fedoraproject.org/wiki/MinGW/Tutorial

@ffes
Copy link
Member

ffes commented Oct 29, 2014

I just tried to build the master with mingw.
I use ./configure --disable-external-sort because that is needed for Windows.
It builds fine.

$ ./ctags --list-features
win32
regex
internal-sort
$

But ./ctags *.c still generates empty tags files (apart from the !_TAG header lines).

I am trying to find what goes wrong.

@masatake
Copy link
Member Author

masatake commented Nov 5, 2014

How

  $ ./ctags --verbose *.c

says?

@ffes
Copy link
Member

ffes commented Nov 5, 2014

I have been debugging and it seems the parsers are not properly loaded. --verbose says they do

Installing parsers: Ada, Ant, Asm, Asp, Awk, Basic, BETA, C, C++, CSS, C#, Cobol
, DosBatch, Eiffel, Erlang, Falcon, Flex, Fortran, Go, HTML, Java, JavaScript, L
isp, Lua, Make, MatLab, ObjectiveC, OCaml, Pascal, Perl, PHP, Python, REXX, Ruby
, Scheme, Sh, SLang, SML, SQL, Tcl, Tex, Vera, Verilog, VHDL, Vim, WindRes, YACC
  Installing default language mappings:
    Ada: .adb .ads .Ada
    Ant: .build.xml
    Asm: (*.A51) (*.29[kK]) (*.[68][68][kKsSxX]) (*.[xX][68][68]) .asm .ASM .s .S
    Asp: .asp .asa
    Awk: .awk .gawk .mawk
    Basic: .bas .bi .bb .pb
    BETA: .bet
    C: .c
    C++: .c++ .cc .cp .cpp .cxx .h .h++ .hh .hp .hpp .hxx
    CSS: .css
    C#: .cs

But all the c-files give an error like this:

Get file language for ada.c
        pattern: ada.c
ignoring ada.c (unknown language)

Still struggling with gdb but slowly getting there.

@ffes
Copy link
Member

ffes commented Nov 5, 2014

Quick update: ./ctags --list-languages shows all languages

@masatake
Copy link
Member Author

masatake commented Nov 7, 2014

Could you send the full output of ./ctags --verboes ada.c to yamato@redhat.com (or paste here)?
I'm very afraid the parser guessing code which I had worked on is broken.

@masatake
Copy link
Member Author

masatake commented Nov 9, 2014

I found the reason why foo.c is not recognized as C file.
See fileNameMatched of strlist.c.
Code in HAVE_FNMATCH is needed to match *.c and foo.c.
fileNameMatched
<= getPatternLanguageAndSpec <=
nominateLanguageCandidatesForPattern <= getPatternLanguage <= getFileLanguage.
In other word wildcard feature is needed.

We have to do the same thing as regex.

@masatake
Copy link
Member Author

masatake commented Nov 9, 2014

Could you try head of master?
I hope wildcard feature now available with ctags --list-features.

@ffes
Copy link
Member

ffes commented Dec 14, 2014

I understand the assignment but I never used autoconf from a devs point of view. So there is much to learn.

@masatake
Copy link
Member Author

@ffes, sorry. My itent of assignment is that just I want to run ctags --list-features again.
I will continue to take efforts to solve the issue.

@ffes
Copy link
Member

ffes commented Jan 22, 2015

Little update:

When I use ./configure --host=i686-w64-mingw32 --disable-external-sort with Cygwin, I can build a native win32 ctags.exe. And I can do make units as well. Some tests fail. #211 has been opened and the others I have to see why they fail.

With MSYS it build as well when using ./configure --disable-external-sort but make units does not work because there is no timeout command.

I still have to try MSYS2. I hope to do that tomorrow. When I know if that works, I can dive into these Cygwin Units test failures.

Summary (see CMDLINE.tmp to reproduce without test harness)
------------------------------------------------------------
  #passed:                                392
  #FIXED:                                 0
  #FAILED (unexpected-exit-status):       4
        conflib-simple
        ctags-simple
        mib-simple
        option-corpora-conflicts
  #FAILED (unexpected-output):            3
        bug1777340.java
        php-simple
        simple.php
  #TIMED-OUT (5s)                         0
  #skipped (features):                    3
        conflib-recursive
        xcmd-coffeetags
        xcmd-simple
  #skipped (languages):                   0
  #known-bugs:                            0

@ffes
Copy link
Member

ffes commented Jan 22, 2015

I also tried to build as a Cygwin application. That works as quite well. Only the php-simple and simple.php test fail. That is both times in the line with täyte in it. Have to find out why it fails though.

Know that Cygwin build != native win32 build. See f-windows.rst for details.

@b4n
Copy link
Member

b4n commented Jan 22, 2015

That works as quite well. Only the php-simple and simple.php test fail. That is both times in the line with täyte in it. Have to find out why it fails though.

php-simple and simple.php (which actually are the same), and formerly bug1777340.java (before c9bd254) are probably the only tests that have non-ASCII output (they are ISO-8859-1), so it probably is an encoding issue of some sort.

@k-takata
Copy link
Member

k-takata commented Sep 7, 2015

Can we close this?

@cweagans cweagans added this to the Initial release milestone Nov 6, 2015
@cweagans
Copy link
Member

cweagans commented Nov 6, 2015

Sorry for the noise. Just switching the "Release blocker" tag for the "Initial release" milestone so that everything is tracked in one place.

@k-takata
Copy link
Member

I think this has already done. Closing.

masatake pushed a commit to masatake/ctags that referenced this issue Mar 12, 2020
* Update our copyright information.
* Import the latest information from oniguruma.

Related: universal-ctags#95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants