osx - Make error: install hqp (huge quadratic programming) on OS X -


i trying install hqp on os x, seems gcc compiler quite different. when running make, first come error malloc.h not found, wrap #include header like:

#if !defined(__apple__) #include <malloc.h> #endif 

in way, first problem solved. when continue run make, got things like:

g++ -shared -o libhqp.so hqp_init.o hqp.o sprcm.o meschach.o spbkp.o matbkp.o bdbkp.o hqp_impl.o hqp_program.o hqp_solver.o hqp_client.o hqp_ipsfranke.o hqp_ipsmehrotra.o hqp_ipmatrix.o hqp_ipspbkp.o hqp_ipredspbkp.o hqp_iplqdocp.o t_mesch.o hqp_ipspsc.o meschext_hl.o hqp_sqpsolver.o hqp_sqppowell.o hqp_sqpschittkowski.o hqp_hl.o hqp_hl_gerschgorin.o hqp_hl_dscale.o hqp_hl_bfgs.o hqp_hl_sparsebfgs.o hqp_sqpprogram.o hqp_docp.o hqp_solve.o \           ../meschach/*.o ../iftcl/*.o -l"/sw/lib" -wl,-rpath,"/sw/lib" -ltclstub8.5 i686-apple-darwin11-llvm-g++-4.2: ../meschach/*.o: no such file or directory i686-apple-darwin11-llvm-g++-4.2: ../iftcl/*.o: no such file or directory 

does know component different time? tried reinstall latest version of tcl, seems not problem. find hard google solution...

without testing result, got work using following steps. have set of makefiles not work should, regard how dependencies set up.

first, edit meschach/machine.h , remove #include <malloc.h>, or make conditional did __apple__ ifdef. reason why malloc.h included seems malloc() , free() , included via stdlib.h anyway.

then edit makedirs.in , append -i/usr/include/malloc mes_incdir, leaving mes_incdir = -i.. -i/usr/include/malloc.

with these 2 steps in place, doing ./configure followed make should give libhqp.so in lib directory, might sufficient you.

however, there executable called docp in directory hqp_docp gets executed during make process. not work because can not find shared libary libhqp.so. resolved cd-ing lib directory , setting export dyld_fallback_library_path=$pwd. not sure whether running docp essential part of process though.

finally, building of library called omu breaks because linker not passed reference required library libhqp.so. did not figure out why work on other systems, , not know whether need libomu @ all. did quick fix adding -l../lib -lhqp end of linker-command in omu/makefile. command starting $(ld).

i hope did not forget of steps took, let me know if still breaks somewhere.


Comments