weixin_39801879
weixin_39801879
2020-12-26 08:18

warning: implicit declaration of function 'strdup'

Hi

This is forwarding the bug reported in the Debian BTS at https://bugs.debian.org/793390

------8<-----------8<-----------8<-----------8<-----------8<-----


Package: boxes
Version: 1.1.2-2
User: ubuntu-devel.ubuntu.com

The current version build log [1] includes this warning
"lexer.l:101:5: warning: implicit declaration of function 'strdup'
[-Wimplicit-function-declaration]"

That warning makes the build fail on Ubuntu
https://launchpadlibrarian.net/210104836/buildlog_ubuntu-wily-amd64.boxes_1.1.2-2_BUILDING.txt.gz

"Our automated build log filter detected the problem(s) above that will
likely cause your package to segfault on architectures where the size of
a pointer is greater than the size of an integer, such as ia64 and amd64."

[1]
https://buildd.debian.org/status/fetch.php?pkg=boxes&arch=amd64&ver=1.1.2-2&stamp=1430047837

------8<-----------8<-----------8<-----------8<-----------8<-----

Regards, Salvatore

该提问来源于开源项目:ascii-boxes/boxes

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39801879 weixin_39801879 4月前

    Hi

    I think the problem lies in the src/Makefile:

    
    --- a/src/Makefile                                                                                                                                                                                    
    +++ b/src/Makefile
    @@ -81,7 +81,7 @@ parser.c parser.h: parser.y boxes.h rege
    
     lex.yy.c: lexer.l boxes.h
            $(LEX) -t lexer.l > lexer.tmp.c
    -       echo #include "config.h" > lex.yy.c
    +       echo '#include "config.h"' > lex.yy.c
            cat lexer.tmp.c >> lex.yy.c
            rm lexer.tmp.c
    

    The echo call is treats the line as comment, so what is echoed is ignored, so config.h is not included.

    Regards, Salvatore

    点赞 评论 复制链接分享
  • weixin_39877898 weixin_39877898 4月前

    Thank you for reporting this and even finding the cause right away! Do you want to create a pull request for this change?

    点赞 评论 复制链接分享
  • weixin_39801879 weixin_39801879 4月前

    Hi,

    On Thu, Jul 23, 2015 at 11:46:59PM -0700, Thomas Jensen wrote:

    Thank you for reporting this and even finding the cause right away! Do you want to create a pull request for this change?

    Sure, have done so now.

    Regards, Salvatore

    点赞 评论 复制链接分享
  • weixin_39877898 weixin_39877898 4月前

    Thanks! I just merged the PR. Do you need a boxes release for this in order to process the fix for Ubuntu?

    点赞 评论 复制链接分享
  • weixin_39801879 weixin_39801879 4月前

    Hi,

    On Fri, Jul 24, 2015 at 01:34:29AM -0700, Thomas Jensen wrote:

    Thanks! I just merged the PR. Do you need a boxes release for this in order to process the fix for Ubuntu?

    No not required, I just apply the patch and remove it again once there is a new boxes release.

    Regards and thanks! Salvatore

    点赞 评论 复制链接分享

相关推荐