a2o / snoopy

Snoopy Command Logger is a small library that logs all program executions on your Linux/BSD system.
GNU General Public License v2.0
1.22k stars 155 forks source link

Iron out cross compilation issues #246

Closed bostjan closed 2 years ago

bostjan commented 2 years ago

Snoopy v2.5.0 seems to be having problems building on (some) non-x86_64 platforms: https://buildd.debian.org/status/package.php?p=snoopy

bostjan commented 2 years ago

cc @MarcosFouces

condemil commented 1 year ago

Looks like it is still an issue for mips:

action-stress-threads.c: In function 'snoopyTestCli_action_stress_threads_threadMain':
action-stress-threads.c:230:77: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  230 |     if (verbose) printf("    t%d %llu : Hello from thread #%d\n", seqNrPub, (unsigned long long)pthread_self(), seqNrPub);
      |                                                                             ^
action-stress-threads.c:234:91: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  234 |     if (verbose) printf("    t%d %llu : Threads before snoopy_init():    %d\n", seqNrPub, (unsigned long long)pthread_self(), snoopy_tsrm_get_threadCount());
      |                                                                                           ^
action-stress-threads.c:236:91: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  236 |     if (verbose) printf("    t%d %llu : Threads after  snoopy_init():    %d\n", seqNrPub, (unsigned long long)pthread_self(), snoopy_tsrm_get_threadCount());
      |                                                                                           ^
action-stress-threads.c:246:89: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  246 |         printf("    t%d %llu : Datasource %s returned negative result: %d\n", seqNrPub, (unsigned long long)pthread_self(), dsName, retVal);
      |                                                                                         ^
action-stress-threads.c:248:67: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  248 |         printf("    t%d %llu : DS result: %30s = %s\n", seqNrPub, (unsigned long long)pthread_self(), dsName, dsResult);
      |                                                                   ^
action-stress-threads.c:253:91: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  253 |     if (verbose) printf("    t%d %llu : Threads before snoopy_cleanup(): %d\n", seqNrPub, (unsigned long long)pthread_self(), snoopy_tsrm_get_threadCount());
      |                                                                                           ^
action-stress-threads.c:255:91: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  255 |     if (verbose) printf("    t%d %llu : Threads after  snoopy_cleanup(): %d\n", seqNrPub, (unsigned long long)pthread_self(), snoopy_tsrm_get_threadCount());
      |                                                                                           ^
action-stress-threads.c:259:75: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  259 |     if (verbose) printf("    t%d %llu : Thread exiting: #%d\n", seqNrPub, (unsigned long long)pthread_self(), seqNrPub);
      |                                                                           ^
bostjan commented 1 year ago

@condemil, let's discuss under #253, thanks.