Giter Club home page Giter Club logo

Comments (12)

andrew-taylor avatar andrew-taylor commented on September 12, 2024

Hopefully fixed in https://github.com/COMP1511UNSW/dcc/releases/tag/2.3

from dcc.

postwave avatar postwave commented on September 12, 2024

EDITED

It seems something is incompatible with stdin..

<stdin>:515:44: error: unknown type name 'off64_t'; did you mean 'off_t'?
static int __dcc_synchronize_seek(void *v, off64_t *offset, int whence) {
^~~~~~~
off_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
dcc explanation: You seem to be using off64_t'; did you mean 'off_t on line 515 of <stdin> as though it's a type, even though it's not been defined as one.
Did you perhaps misspell off64_t'; did you mean 'off_t or forget to typedef it?
<stdin>:583:1: error: unknown type name 'clock_t'
clock_t clock(void) {
^
dcc explanation: You seem to be using clock_t on line 583 of <stdin> as though it's a type, even though it's not been defined as one.
Did you perhaps misspell clock_t or forget to typedef it?
<stdin>:624:9: warning: implicit declaration of function 'fopencookie' is invalid in C99 [-Wimplicit-function-declaration]
return fopencookie(cookie, mode, (cookie_io_functions_t) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
dcc explanation: you are calling a function named fopencookie line 624 of but dcc does not recognize fopencookie as a function.
There are several possible causes:
a) You might have misspelt the function name.
b) You might need to add a #include line at the top of .
c) You might need to add a prototype for fopencookie.

from dcc.

postwave avatar postwave commented on September 12, 2024

I didn't use any flag and here is the test file

#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (argc!=2) {
printf("Usage: %s number\n", argv[0]);
return 1;
} else {
int n;
int m;
if (sscanf(argv[1],"%d,%d",&n,&m)!=2) {
printf("op\n");
return 1;
} else {
printf("%d %d\n", n, m);
}
}
return 0;
}

from dcc.

andrew-taylor avatar andrew-taylor commented on September 12, 2024

Could you compile with -fsanitize=address e.g.

dcc -fsanitize=address main.c

and let me know how that goes?

from dcc.

postwave avatar postwave commented on September 12, 2024

Error messages(I missed some brackets in previous comment, error messages should be from <stdin>, edited):

<stdin>:1033:5: warning: implicitly declaring library function 'va_start' with type 'void (struct __va_list_tag *, ...)' [-Wimplicit-function-declaration]
va_start(arg, format);
^
dcc explanation: You are calling the function va_start on line 1033 of but dcc does not recognize va_start as a function
because you have forgotten to #include

<stdin>:1035:5: warning: implicitly declaring library function 'va_end' with type 'void (struct __va_list_tag *)' [-Wimplicit-function-declaration]
va_end(arg);
^
dcc explanation: You are calling the function va_end on line 1035 of but dcc does not recognize va_end as a function
because you have forgotten to #include

Undefined symbols for architecture x86_64:
"_va_end", referenced from:
_debug_printf in --963b48.o
_scanf in --963b48.o
_printf in --963b48.o
"_va_start", referenced from:
_debug_printf in --963b48.o
_scanf in --963b48.o
_printf in --963b48.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)'

from dcc.

andrew-taylor avatar andrew-taylor commented on September 12, 2024

Could report if https://github.com/COMP1511UNSW/dcc/releases/tag/2.4 works please

from dcc.

postwave avatar postwave commented on September 12, 2024

$ dcc -fsanitize=address input.c or $ dcc input.c or $ dcc --leak-check input.c

warning: unknown warning option '-Wunused-but-set-variable'; did you mean '-Wunused-const-variable'? [-Wunknown-warning-option]

warning: unknown warning option '-Wduplicated-cond'; did you mean '-Wduplicate-enum'? [-Wunknown-warning-option]

warning: unknown warning option '-Wduplicated-branches' [-Wunknown-warning-option]

warning: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Wunknown-warning-option]

4 warnings generated.

error: cannot parse the debug map for '/dev/null': The file was not recognized as a valid object file

clang: error: dsymutil command failed with exit code 1 (use -v to see invocation)


$ dcc -fsanitize=undefined input.c

only 1 or sanitizers supported

from dcc.

andrew-taylor avatar andrew-taylor commented on September 12, 2024

Please try https://github.com/COMP1511UNSW/dcc/releases/tag/2.6

from dcc.

postwave avatar postwave commented on September 12, 2024

Similar error to two weeks ago, except it's in different lines of stdin.
Thanks for your patience

<stdin>:301:39: error: unknown type name 'off64_t'; did you mean 'off_t'?
static int __dcc_cookie_seek(void *v, off64_t *offset, int whence);
^~~~~~~
off_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
dcc explanation: You seem to be using off64_t'; did you mean 'off_t on line 301 of <stdin> as though it's a type, even though it's not been defined as one.
Did you perhaps misspell off64_t'; did you mean 'off_t or forget to typedef it?
<stdin>:305:9: warning: implicit declaration of function 'fopencookie' is invalid in C99 [-Wimplicit-function-declaration]
return fopencookie(cookie, mode, (cookie_io_functions_t) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
dcc explanation: you are calling a function named fopencookie line 305 of but dcc does not recognize fopencookie as a function.
There are several possible causes:
a) You might have misspelt the function name.
b) You might need to add a #include line at the top of .
c) You might need to add a prototype for fopencookie.

from dcc.

andrew-taylor avatar andrew-taylor commented on September 12, 2024

Please try https://github.com/COMP1511UNSW/dcc/releases/tag/2.6.3

from dcc.

postwave avatar postwave commented on September 12, 2024

Same except line index changed.

<stdin>:308:39: error: unknown type name 'off64_t'; did you mean 'off_t'?
static int __dcc_cookie_seek(void *v, off64_t *offset, int whence);
^~~~~~~
off_t
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
dcc explanation: You seem to be using off64_t'; did you mean 'off_t on line 308 of <stdin> as though it's a type, even though it's not been defined as one.
Did you perhaps misspell off64_t'; did you mean 'off_t or forget to typedef it?
<stdin>:312:9: warning: implicit declaration of function 'fopencookie' is invalid in C99 [-Wimplicit-function-declaration]
return fopencookie(cookie, mode, (cookie_io_functions_t) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_off_t.h:31:33: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
dcc explanation: you are calling a function named fopencookie line 312 of but dcc does not recognize fopencookie as a function.
There are several possible causes:
a) You might have misspelt the function name.
b) You might need to add a #include line at the top of .
c) You might need to add a prototype for fopencookie.

from dcc.

postwave avatar postwave commented on September 12, 2024

Something wrong with format. I didn't realise.
4 ^ are pointing off64_t, off_t, fopencookie, off_t respectively.

from dcc.

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.