Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown type name "KIS_<stuff>" when --with-dummy is specified. #127

Closed
DanTheMann15 opened this issue Dec 18, 2023 · 1 comment
Closed

Comments

@DanTheMann15
Copy link
Contributor

Testing my script to build tsschecker and ran into this.

The first commit to have this problem is 4472436, it seems to compile fine if i don't specify --with-dummy.

Host: x86_64-w64-mingw32
Target: x86_64-w64-mingw32
Toolchain: MSYS2 (on mingw64 terminal)

options passed:
./autogen.sh --enable-static --disable-shared --without-udev --with-dummy --without-tools --prefix=/usr/local

Note: i did modify the include to define IRECV_STATIC so it'll build statically, same problem exists with libplist: refs libplist/issues/230.

Console log:

-------------------------------------------

  Install prefix: .........: /tmp/tsschecker_build_win64
  USB backend: ............: dummy

  Now type 'make' to build libirecovery 1.1.0-13-g010b3b0-dirty,
  and then 'make install' for installation.

Making install in src
make[1]: Entering directory '/c/Users/Daniel/Desktop/stuff/tsschecker/tsschecker_build_win64/libirecovery/src'
  CC       libirecovery_1_0_la-libirecovery.lo
libirecovery.c: In function 'irecv_kis_send_buffer':
libirecovery.c:3158:9: error: unknown type name 'KIS_upload_chunk'
 3158 |         KIS_upload_chunk *chunk = calloc(1, sizeof(KIS_upload_chunk));
      |         ^~~~~~~~~~~~~~~~
libirecovery.c:3158:52: error: 'KIS_upload_chunk' undeclared (first use in this function)
 3158 |         KIS_upload_chunk *chunk = calloc(1, sizeof(KIS_upload_chunk));
      |                                                    ^~~~~~~~~~~~~~~~
libirecovery.c:3158:52: note: each undeclared identifier is reported only once for each function it appears in
libirecovery.c:3165:39: warning: implicit declaration of function 'irecv_kis_request_init' [-Wimplicit-function-declaration]
 3165 |                 irecv_error_t error = irecv_kis_request_init(&chunk->hdr, KIS_PORTAL_RSM, KIS_INDEX_UPLOAD, 3, toUpload, 0);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~
libirecovery.c:3165:68: error: request for member 'hdr' in something not a structure or union
 3165 |                 irecv_error_t error = irecv_kis_request_init(&chunk->hdr, KIS_PORTAL_RSM, KIS_INDEX_UPLOAD, 3, toUpload, 0);
      |                                                                    ^~
libirecovery.c:3172:22: error: request for member 'address' in something not a structure or union
 3172 |                 chunk->address = address;
      |                      ^~
libirecovery.c:3173:22: error: request for member 'size' in something not a structure or union
 3173 |                 chunk->size    = toUpload;
      |                      ^~
libirecovery.c:3174:29: error: request for member 'data' in something not a structure or union
 3174 |                 memcpy(chunk->data, buffer, toUpload);
      |                             ^~
libirecovery.c:3176:17: error: unknown type name 'KIS_generic_reply'
 3176 |                 KIS_generic_reply reply;
      |                 ^~~~~~~~~~~~~~~~~
libirecovery.c:3178:25: warning: implicit declaration of function 'irecv_kis_request' [-Wimplicit-function-declaration]
 3178 |                 error = irecv_kis_request(client, &chunk->hdr, sizeof(*chunk) - (0x4000 - toUpload), &reply.hdr, &rcvSize);
      |                         ^~~~~~~~~~~~~~~~~
libirecovery.c:3178:57: error: request for member 'hdr' in something not a structure or union
 3178 |                 error = irecv_kis_request(client, &chunk->hdr, sizeof(*chunk) - (0x4000 - toUpload), &reply.hdr, &rcvSize);
      |                                                         ^~
libirecovery.c:3178:108: error: request for member 'hdr' in something not a structure or union
 3178 |                 error = irecv_kis_request(client, &chunk->hdr, sizeof(*chunk) - (0x4000 - toUpload), &reply.hdr, &rcvSize);
      |                                                                                                            ^
libirecovery.c:3189:27: error: 'irecv_client_private' has no member named 'progress_callback'
 3189 |                 if (client->progress_callback != NULL) {
      |                           ^~
libirecovery.c:3195:31: error: 'irecv_client_private' has no member named 'progress_callback'
 3195 |                         client->progress_callback(client, &event);
      |                               ^~
libirecovery.c:3203:39: warning: implicit declaration of function 'irecv_kis_config_write32' [-Wimplicit-function-declaration]
 3203 |                 irecv_error_t error = irecv_kis_config_write32(client, KIS_PORTAL_RSM, KIS_INDEX_BOOT_IMG, origLen);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~
libirecovery.c: At top level:
libirecovery.c:3150:22: warning: 'irecv_kis_send_buffer' defined but not used [-Wunused-function]
 3150 | static irecv_error_t irecv_kis_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned long length, int dfu_notify_finished)
      |                      ^~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:472: libirecovery_1_0_la-libirecovery.lo] Error 1
make[1]: Leaving directory '/c/Users/Daniel/Desktop/stuff/tsschecker/tsschecker_build_win64/libirecovery/src'
make: *** [Makefile:419: install-recursive] Error 1

@nikias
Copy link
Member

nikias commented Dec 30, 2023

Should work again with 2fff426.

@nikias nikias closed this as completed Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants