You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/07/02 03:28:00 UTC

[jira] [Commented] (IMPALA-11403) CMake warning triggered by a sed regexp in common/thrift

    [ https://issues.apache.org/jira/browse/IMPALA-11403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17561693#comment-17561693 ] 

ASF subversion and git services commented on IMPALA-11403:
----------------------------------------------------------

Commit bb610dee09a8069bb993b4c668f7e481c1774b70 in impala's branch refs/heads/dependabot/pip/infra/python/deps/urllib3-1.26.5 from Laszlo Gaal
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=bb610dee0 ]

IMPALA-11403: Fix cmake escaping for sed regex in common/thrift

common/thrift/CMakeLists.txt contains a sed command line with a captured
group. This sed construct uses a single backslash ('\1'), which was
entered verbatim into CMakeLists.txt. The backslash character is however
an escape character for cmake as well, so it reported a warning about
incorrect escaping syntax when processing this file.
Fortunately the generated Makefile output was still correct.

The patch doubles the backslashes in the sed command line to escape them
correctly according to cmake's syntax rules.

Tested by running `./buildall.sh -cmake_only` on the changed file and
verifying that
- the warning is eliminated
- the generated output still contained the expected sed regex.

Change-Id: I8785fa0500d3a296f98efb973c6ce0737a02e8bb
Reviewed-on: http://gerrit.cloudera.org:8080/18678
Reviewed-by: Michael Smith <mi...@cloudera.com>
Reviewed-by: Riza Suminto <ri...@cloudera.com>
Reviewed-by: Zoltan Borok-Nagy <bo...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> CMake warning triggered by a sed regexp in common/thrift
> --------------------------------------------------------
>
>                 Key: IMPALA-11403
>                 URL: https://issues.apache.org/jira/browse/IMPALA-11403
>             Project: IMPALA
>          Issue Type: Bug
>    Affects Versions: Impala 4.2.0
>            Reporter: Laszlo Gaal
>            Assignee: Laszlo Gaal
>            Priority: Major
>
> While investigating a different issue, a CMake warning was noticed in the build output, complaining about a {{sed}} regexp in a build rule:{code}
> 00:02:26.836 CMake Warning (dev) at common/thrift/CMakeLists.txt:238 (add_custom_target):
> 00:02:26.836   Syntax error in cmake code at
> 00:02:26.836 
> 00:02:26.836     /home/ubuntu/Impala/common/thrift/CMakeLists.txt:239
> 00:02:26.836 
> 00:02:26.836   when parsing string
> 00:02:26.836 
> 00:02:26.836     's|\(dispatchCallTemplated.*\));|\1) override;|'
> 00:02:26.836 
> 00:02:26.836   Invalid escape sequence \1
> 00:02:26.836 
> 00:02:26.836   Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
> 00:02:26.836   "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
> 00:02:26.836   command to set the policy and suppress this warning.
> 00:02:26.836 This warning is for project developers.  Use -Wno-dev to suppress it.
> 00:02:26.836 
> {code}
> This probably indicates an escaping problem: too many programs use the backslash for escaping various special characters.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org