Windows compile issue

393 views
Skip to first unread message

Stefan Lorenz

unread,
Feb 17, 2016, 12:49:17 PM2/17/16
to golden-cheetah-users
Hi,
I'm trying to compile gc under Windows 10

Any idea what can cause these conflicts when bison is running?
 
D:/Programmieren/GnuWin32/bin/bison --file-prefix=y -t -v -d -p DataFilter DataFilter.y
DataFilter.y: Konflikte: 2 Schiebe/Reduziere
del /f DataFilter_yacc.h DataFilter_yacc.cpp
process_begin: CreateProcess(NULL, del /f DataFilter_yacc.h DataFilter_yacc.cpp, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
Makefile.Release:72387: recipe for target 'DataFilter_yacc.h' failed
mingw32-make[2]: *** [DataFilter_yacc.h] Error 2
mingw32-make[2]: Leaving directory 'D:/Programmieren/GoldenCheetah/src'
Makefile:34: recipe for target 'release' failed
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory 'D:/Programmieren/GoldenCheetah/src'
makefile:82: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make: *** [sub-src-make_first-ordered] Error 2
D:\Programmieren\GoldenCheetah>

Regards,
Stefan 

Mark Liversedge

unread,
Feb 17, 2016, 1:17:34 PM2/17/16
to golden-cheetah-users
Make sure you have a recent version of bison, I use win_bison 2.7

Mark

Erik Botö

unread,
Feb 17, 2016, 2:34:03 PM2/17/16
to golden-cheetah-users
When I build on Windows, even with newer bison and flex I get some other names on the output files (something like y.<filename>.c/h). So I manually rename them to <filename>_yacc.cpp and <filename>_yacc.h. There's something like 5-6 files so I haven't spent any more time looking into how to get the proper names directly.

Cheers,
Erik

Stefan Lorenz

unread,
Feb 17, 2016, 4:10:56 PM2/17/16
to golden-cheetah-users
Ok, i'll check the version first and then look for the y. files...

thx for helping...

Z Lumorx

unread,
Mar 15, 2016, 3:18:36 AM3/15/16
to golden-cheetah-users
I have the same issue. And my bison and flex are up to date.

Do I have to change the setting for bison and flex in gcconfig.pri?

I'm using QT 5.5.1 with MSYS2 on Win10 64bit.

Jörn R.

unread,
Mar 15, 2016, 2:15:58 PM3/15/16
to golden-cheetah-users
This is the setting in gcconfig.pri I am using and is working fine - NOTE - this is my config.pri for Win builds - so the "win32 { }" is not needed.

I am using flex/bison (latest) from here: https://sourceforge.net/projects/winflexbison/

# Let us know where flex and bison are installed.
# You may need to specify the full path if things don't work.
CONFIG += lex
CONFIG += yacc

QMAKE_LEX  = win_flex --wincompat
QMAKE_YACC = win_bison --file-prefix=y -t
#win32 {
#  QMAKE_YACC = win_bison --file-prefix=y -t
  #QMAKE_MOVE = mv -f
  #QMAKE_DEL_FILE = rm -f
#}

Jörn R.

unread,
Mar 15, 2016, 3:41:39 PM3/15/16
to golden-cheetah-users
Just re-thought and had a look at the make files.
The sequence is
- del old files
- run bison
- copy bison files to new names

Your sequence seems different. 
I remember to have some problem with flex/yacc when running make with multiple jobs option (-j n). 
If you do this with n > 1, just run it without -j option or -j 1.

Mark Liversedge

unread,
Mar 15, 2016, 4:13:53 PM3/15/16
to golden-cheetah-users
I use jom on Win 10.

gcconfig.pri looks like this:

# Let us know where flex and bison are installed.                              
# You may need to specify the full path if things don't work.                  
CONFIG += lex                                                                  
CONFIG += yacc                                                                 
                                                                               
QMAKE_LEX  = win_flex --wincompat                                              
QMAKE_YACC = win_bison --file-prefix=y -t                                      
                                                                               
# Make sure that LEX/YACC is executed first (to allow multi-core compilation)  
lex.CONFIG += target_predeps                                                   
yacc_impl.CONFIG += target_predeps                                             
yacc_decl.CONFIG += target_predeps     
                                        
It does this at compile time:

> jom

jom 1.1.0 - empower your cores

        E:\Qt\Qt5.6.0-GC\msvc2015_64\bin\jom.exe -f Makefile.Release
        del DataFilter_yacc.h DataFilter_yacc.cpp
        win_bison --file-prefix=y -t -d -p DataFilter -b DataFilter Core\DataFilter.y
Core\DataFilter.y: conflicts: 2 shift/reduce
        move DataFilter.tab.h DataFilter_yacc.h
        1 file(s) moved.
        move DataFilter.tab.c DataFilter_yacc.cpp
        1 file(s) moved.

I started using jom as make had issues and it seems to work ok most of the time.

Mark

Piotr Kubica

unread,
Sep 2, 2016, 5:33:41 PM9/2/16
to golden-cheetah-users
I have had the same problem while trying to build gc from sources.

I run mingw32-make release
and I'm getting following error

mingw32-make[1]: Entering directory 'C:/Users/piotr_000/workspace-cpp/goldencheetah/src'
bison --file-prefix=y -t -d -p DataFilter Core\DataFilter.y
Makefile.Release:1627: recipe for target 'DataFilter_yacc.h' failed
mingw32-make[1]: Leaving directory 'C:/Users/piotr_000/workspace-cpp/goldencheetah/src'
Makefile:48: recipe for target 'release' failed

I have latest win_bison.exe (ver 2.7) and win_flex.exe (2.5.37) on system Path

# my gcconfig.pri

CONFIG += lex
CONFIG += yacc
                                                
QMAKE_LEX = win_flex --wincompat
win32 {
  QMAKE_YACC = bison --file-prefix=y -t
  QMAKE_MOVE = cmd /c move
  QMAKE_DEL_FILE = rm -f

}

Am I missing something?
Reply all
Reply to author
Forward
0 new messages