Opened 14 years ago

Closed 14 years ago

#24296 closed defect (fixed)

lp_solve parallel build issue

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: deeparnab@…, 20.celso@…
Port: lp_solve

Description

lp_solve sometimes fails to build in parallel, failing like this:

--->  Staging lp_solve into destroot
Error: Target org.macports.destroot returned: xinstall: Unable to chdir to
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_lp_solve/work/lp_solve_5.5/lpsolve55/bin/osx64,
No such file or directory
Error: Status 1 encountered during processing.

This was reported on the mailing list by Deeparnab Chakrabarty and Celso Coutinho

Change History (1)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

The lp_solve build system doesn't come with a Makefile, so I made one, to allow the "lp_solve" and "lpsolve55" components of lp_solve to be built in parallel. The problem is that the "ccc.osx" script in both of these components runs some tests, and does so by creating the files /tmp/platform.c and /tmp/isnan.c, compiling them to /tmp/platform and /tmp/isnan, running those programs to determine their result, and then deleting them. When built in parallel, both components try to do these tests at about the same time. By the time the second component gets around to deleting these temporary files, the first component has already deleted them, causing the second component to experience a file-not-found error and not continue with the rest of the script and build the software, thus resulting in the second component's platform directory and its contents not existing at destroot time.

The solution is for lp_solve not to write files directly into /tmp, but instead into a temporary directory with a random name, such as would be created by "mktemp -d". I've implemented this fix in r65749 and will send the patch upstream for consideration.

Note: See TracTickets for help on using tickets.