Coder Social home page Coder Social logo

编译报错 about judger HOT 3 CLOSED

Mr-Python-in-China avatar Mr-Python-in-China commented on August 18, 2024
编译报错

from judger.

Comments (3)

Mr-Python-in-China avatar Mr-Python-in-China commented on August 18, 2024

算了我加一下代码块()

mrpython@MP-ThinkPad:~/Desktop/Judger/build$ cmake .. && make && sudo make install
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Configuring done
-- Generating done
-- Build files have been written to: /home/mrpython/Desktop/Judger/build
[  8%] Building C object CMakeFiles/libjudger.so.dir/src/argtable3.o
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4479:13,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4467:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4466:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4435:13,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4439:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4438:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/libjudger.so.dir/build.make:76:CMakeFiles/libjudger.so.dir/src/argtable3.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/libjudger.so.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2

from judger.

wangxso avatar wangxso commented on August 18, 2024

Do you use Ubuntu:22.04? and which you gcc, cmake version

算了我加一下代码块()

mrpython@MP-ThinkPad:~/Desktop/Judger/build$ cmake .. && make && sudo make install
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Configuring done
-- Generating done
-- Build files have been written to: /home/mrpython/Desktop/Judger/build
[  8%] Building C object CMakeFiles/libjudger.so.dir/src/argtable3.o
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4479:13,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4467:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4466:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4435:13,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4439:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
In function ‘arg_cat’,
    inlined from ‘arg_cat_option’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4438:17,
    inlined from ‘arg_print_syntax’ at /home/mrpython/Desktop/Judger/src/argtable3.c:4681:9:
/home/mrpython/Desktop/Judger/src/argtable3.c:4406:11: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
 4406 |     *dest = 0;
      |     ~~~~~~^~~
/home/mrpython/Desktop/Judger/src/argtable3.c: In function ‘arg_print_syntax’:
/home/mrpython/Desktop/Judger/src/argtable3.c:4669:14: note: at offset 200 into destination object ‘syntax’ of size 200
 4669 |         char syntax[200]="";
      |              ^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/libjudger.so.dir/build.make:76:CMakeFiles/libjudger.so.dir/src/argtable3.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:83:CMakeFiles/libjudger.so.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2

from judger.

wangxso avatar wangxso commented on August 18, 2024

the answer is the gcc 11 change the front to c++ 14 and in this codebase argtable3 version out of date
you can try to update the argtable3.c and argtable3.h and it is working for me.
argtable3 release

from judger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.