[MDEV-4607] NetBSD compiler errors concerning HIST_ENTRY Created: 2013-06-01 Updated: 2013-06-02 Resolved: 2013-06-01 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.31 |
| Fix Version/s: | 5.5.32 |
| Type: | Bug | Priority: | Major |
| Reporter: | Anthony Howe | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | netbsd | ||
| Environment: |
NetBSD 6.1, gcc 4.5.3, readline-6.2 |
||
| Attachments: |
|
| Description |
|
After applying previous patches ( [ 96%] Building CXX object client/CMakeFiles/mysql.dir/mysql.cc.o Proposed patch: 92a93,95 |
| Comments |
| Comment by Vladislav Vaintroub [ 2013-06-01 ] |
|
Looking at cmake/readline.cmake, HAVE_HIST_ENTRY is set only if following code compiles. " In other words, including <readline/readline.h> alone must be sufficient for HIST_ENTRY to be found (at least the test is written is this way) I presume that there is some kind of conflict between system header and the header in cmd-line-utils/readline.h. Would it be possible for you to find out which one gets included during compilation? Could you also attach CMakeCache.txt from the build directory , for diagnostics ? |
| Comment by Anthony Howe [ 2013-06-01 ] |
|
Here's the cmake what's it. I'll look in the other part shortly. |
| Comment by Anthony Howe [ 2013-06-01 ] |
|
There are two readlines it appears: /usr/include/readline/readline.h which defines HIST_ENTRY directly, and /usr/pkg/include/readline/readline.h installed by the package system (pkgin, similar to apt/yum) probably as a dependency with other packages. My cmake configure command was: cmake -DCMAKE_C_FLAGS="-Wno-char-subscripts -I/usr/pkg/include" -DCMAKE_EXE_LINKER_FLAGS=-L/usr/pkg/lib . I suspect that your readline test does not include the extra -I and -L paths when testing and so picks up the system readline.h instead of the package installed one. |
| Comment by Vladislav Vaintroub [ 2013-06-01 ] |
|
If you also set -DREADLINE_INCLUDE_DIR=/usr/pkg/include , and rebuild, will this work? to me it looks like it should Can you also tell why are you using you actually /usr/pkg/include, if you have the header already installed in standard place? Also is this necessary to use /usr/pkg/lib, rather than /usr/lib ? I |
| Comment by Anthony Howe [ 2013-06-01 ] |
|
All the extra packages that get installed, similar to what rpm, apt, or yum do, go under the /usr/pkg tree, which is a standard location for NetBSD packages. I didn't know that NetBSD already included readline in the stock installation and the package one was added as a dependency, and by force of habit I include /usr/pkg. I'm currently trying a build without using /usr/pkg, if that fails I'll try with your suggested change for readline directory. BTW these warnings also appear during compile: [ 13%] Building C object mysys/CMakeFiles/mysys.dir/my_gethwaddr.c.o [ 61%] Building C object sql/CMakeFiles/sql.dir/__/sql-common/client_plugin.c.o [ 67%] Building CXX object sql/CMakeFiles/sql.dir/sql_test.cc.o |
| Comment by Anthony Howe [ 2013-06-01 ] |
|
Without explicit reference to /usr/pkg, cmake appears to discover /usr/pkg/include/readline/readline.h, but still fails to build. With explicit reference using -I and -L to /usr/pkg, it fails to build. Applying my patch, rectifies the issue. If you require, I can create a user account on my NetBSD file server for you to conduct your own build experiments. Contact me directly by email for details. |
| Comment by Vladislav Vaintroub [ 2013-06-02 ] |
|
Anthony, PS. This is followup to mail exchange, you mail server seems to reject montyprogram.com mails now |