Bug 374523 - kdevelop-pg-qt yymore_used_but_not_detected undefined
Summary: kdevelop-pg-qt yymore_used_but_not_detected undefined
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-04 03:24 UTC by Leslie Zhai
Modified: 2017-01-05 16:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leslie Zhai 2017-01-04 03:24:40 UTC
Hi KDevelop developers,

flex-2.6.3 yymore_used_but_not_detected undefined issue http://www.efm.leeds.ac.uk/~as/Old/gnu/info_html/flex_21.html

So I simply added --yymore option for kdev-pg/CMakeLists.txt


diff --git a/kdev-pg/CMakeLists.txt b/kdev-pg/CMakeLists.txt
index 5490835..19dc3a4 100644
--- a/kdev-pg/CMakeLists.txt
+++ b/kdev-pg/CMakeLists.txt
@@ -76,7 +76,7 @@ IF(FLEX_EXECUTABLE)
         DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/kdev-pg-lexer.ll"
                  ${OPTIONAL_PARSER_HEADER_DEPENDENCY}
         COMMAND ${FLEX_EXECUTABLE}
-        ARGS    --nounistd -o"${CMAKE_CURRENT_BINARY_DIR}/kdev-pg-lexer.cc"
+        ARGS    --yymore --nounistd -o"${CMAKE_CURRENT_BINARY_DIR}/kdev-pg-lexer.cc"
                 "${CMAKE_CURRENT_SOURCE_DIR}/kdev-pg-lexer.ll"
         )



Regards,
Leslie Zhai
Comment 1 Leslie Zhai 2017-01-05 03:44:20 UTC
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DKDE_INSTALL_LIBDIR=lib -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
CMake Warning (dev) at kdev-pg/CMakeLists.txt:1 (PROJECT):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/cc/CMakeLists.txt:2 (PROJECT):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/cool/CMakeLists.txt:2 (PROJECT):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/foolisp/CMakeLists.txt:1 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at examples/php/CMakeLists.txt:1 (project):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
    PROJECT_VERSION_MAJOR
    PROJECT_VERSION_MINOR
    PROJECT_VERSION_PATCH
This warning is for project developers.  Use -Wno-dev to suppress it.

-- 
-- The following REQUIRED packages have been found:

 * ECM (required version >= 1.1.0)
 * Qt5Core
 * Qt5Test
 * Qt5 (required version >= 5.2.0)

-- Configuring done
-- Generating done
-- Build files have been written to: /data/project/kde/kdevelop-pg-qt/build
[zhaixiang@iSOFT build]$ make
Scanning dependencies of target kdev-pg-qt_automoc
[  1%] Automatic moc for target kdev-pg-qt
Generating moc compilation kdev-pg-qt_automoc.cpp
[  1%] Built target kdev-pg-qt_automoc
[  3%] Generating qrc_unidata.cpp
[  5%] Generating kdev-pg-parser.cc, kdev-pg-parser.hh
/data/project/kde/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy: 警告: 197 shift/reduce conflicts [-Wconflicts-sr]
/data/project/kde/kdevelop-pg-qt/kdev-pg/kdev-pg-parser.yy: 警告: 24 reduce/reduce conflicts [-Wconflicts-rr]
[  7%] Generating kdev-pg-lexer.cc
Scanning dependencies of target kdev-pg-qt
[  9%] Building CXX object kdev-pg/CMakeFiles/kdev-pg-qt.dir/kdev-pg-lexer.cc.o
/data/project/kde/kdevelop-pg-qt/kdev-pg/kdev-pg-lexer.ll: ‘int yylex()’:
/data/project/kde/kdevelop-pg-qt/build/kdev-pg/kdev-pg-lexer.cc:1228:18: Error:‘yymore_used_but_not_detected’ undefined
 
                  ^
/data/project/kde/kdevelop-pg-qt/kdev-pg/kdev-pg-lexer.ll:46:35: 附注:in expansion of macro ‘yymore’
 #define YYMORE yymoreFlag = true; yymore();
                                   ^~~~~~
/data/project/kde/kdevelop-pg-qt/kdev-pg/kdev-pg-lexer.ll:255:12: 附注:in expansion of macro ‘YYMORE’
   {Newline}               newline(); YYMORE;
            ^~~~~~
/data/project/kde/kdevelop-pg-qt/build/kdev-pg/kdev-pg-lexer.cc: 在全局域:
/data/project/kde/kdevelop-pg-qt/build/kdev-pg/kdev-pg-lexer.cc:2740:17: 警告:‘void yyunput(int, char*)’ defined but not used [-Wunused-function]
 
                 ^      
kdev-pg/CMakeFiles/kdev-pg-qt.dir/build.make:84: recipe for target 'kdev-pg/CMakeFiles/kdev-pg-qt.dir/kdev-pg-lexer.cc.o' failed
make[2]: *** [kdev-pg/CMakeFiles/kdev-pg-qt.dir/kdev-pg-lexer.cc.o] Error 1
CMakeFiles/Makefile2:1065: recipe for target 'kdev-pg/CMakeFiles/kdev-pg-qt.dir/all' failed
make[1]: *** [kdev-pg/CMakeFiles/kdev-pg-qt.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Comment 2 Kevin Funk 2017-01-05 10:11:21 UTC
Git commit 7aa292e5c4b2dc2b8a420e7e8b8e32f61268fe5b by Kevin Funk, on behalf of Leslie Zhai.
Committed on 05/01/2017 at 10:05.
Pushed by kfunk into branch '2.0'.

Fix yymore_used_but_not_detected undefined issue

flex-2.6.3 failed to

```
  #define yymore() yymore_used_but_not_detected
```

throw yymore_used_but_not_detected undefined issue, so I simply added --yymore option for CMakeLists.txt

REVIEW: 129766
FIXED-IN: 2.0.1

M  +1    -1    kdev-pg/CMakeLists.txt

https://commits.kde.org/kdevelop-pg-qt/7aa292e5c4b2dc2b8a420e7e8b8e32f61268fe5b