#241 closed bug (fixed)
omalloc build system is not parallel safe
Reported by: | Owned by: | hannes | |
---|---|---|---|
Priority: | minor | Milestone: | 3-1-2 and higher |
Component: | omalloc | Version: | 3-1-1 |
Keywords: | Cc: |
Description (last modified by )
Building omalloc with make -jn for n>=2 can trigger a race condition between the creation of headers and their usage during compilation.
$ make -j3 gcc -g -O2 -I. -DHAVE_CONFIG_H -DOM_GENERATE_INC omTables.c -o omTables ./makeheader om_Alloc.h omalloc.h gcc -g -O2 -I. -DHAVE_CONFIG_H -DOM_NDEBUG -c omalloc.c -o omalloc.o In file included from omalloc.c:16: ./omalloc.h:12:1: error: unterminated #ifndef omalloc.c: In function ‘calloc’: omalloc.c:31: error: expected expression before ‘void’ omalloc.c: In function ‘malloc’: omalloc.c:41: error: expected expression before ‘void’ omalloc.c: In function ‘realloc’: omalloc.c:76: error: expected expression before ‘void’ omalloc.c: In function ‘strdup_’: omalloc.c:98: warning: assignment makes pointer from integer without a cast omalloc.c: In function ‘reallocSize’: omalloc.c:115: error: expected expression before ‘void’ omTables.c: In function ‘OutputSize2Bin’: omTables.c:70: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘size_t’ omTables.c: In function ‘OutputSize2AlignedBin’: omTables.c:91: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘size_t’ make: *** [omalloc.o] Error 1 make: *** Waiting for unfinished jobs.... omTables.c: In function ‘OutputStaticBin’: omTables.c:117: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘size_t’ omTables.c:117: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘size_t’ omTables.c:121: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘size_t’ omTables.c:121: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘size_t’ makeheader: Include file omTables.h not found make: *** [omalloc.h] Error 1
This is due to not specifying the correct dependencies on the header in Makefile.in
Attachments (1)
Change History (3)
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
Description: | modified (diff) |
---|
We hav eintegrated you patch among others, which should Singular make more parallel-save.
Note: See
TracTickets for help on using
tickets.
fixed (for each Singular subdir). (will appear in nightly_build this night). Problem was the generated C/C++ text: while one cpu was still generating the file, another one was already using the (incomplete) file. Fixed by generating temp. files which will be renamed at the very end of the generating rule.
But there are still dependencies between all the subdirs!