Skip to content

Makefile: add install target#38

Open
nim65s wants to merge 5 commits intokul-optec:masterfrom
nim65s:master
Open

Makefile: add install target#38
nim65s wants to merge 5 commits intokul-optec:masterfrom
nim65s:master

Conversation

@nim65s
Copy link

@nim65s nim65s commented Aug 2, 2024

Hi,

This PR moves the install procedure from Dockerfile to Makefile.

While here, it fixes a couple issues discussed in #29 and #34 to make things work on more modern system. As such, the base docker image can be updated from trusty to noble (14.04 to 24.04).

NB: as already discussed in #34, 3 unit tests are failing:

<FAIL>  (Test SuperSCS (0,0,1) with FPR) -- y should be nan
<FAIL>  (Test SuperSCS (0,0,1) with R-Broyden) -- y should be nan
<FAIL>  (Test residuals) -- rel gap [0] not NAN

so the docker image only ensure tests are building fine for now.

nim65s added 5 commits August 2, 2024 12:29
to fix build error:
```
gcc -g -Wall -std=c99 -Wwrite-strings -funroll-loops -Wstrict-prototypes -I. -Iinclude -fPIC -Ofast -DSVD_ACTIVATED=1 -DCTRLC=1  -DCOPYAMATRIX=1  -DLAPACK_LIB_FOUND -DUSE_LAPACK -c src/scs.c -o out/obj/scs.o
In file included from include/scs.h:36,
                 from src/scs.c:28:
include/util.h:78:25: error: field 'tic' has incomplete type
   78 |         struct timespec tic;
      |                         ^~~
include/util.h:79:25: error: field 'toc' has incomplete type
   79 |         struct timespec toc;
      |                         ^~~
make: *** [Makefile:59: out/obj/scs.o] Error 1
```
Error was:
```
Building test runner...
gcc -g -Wall -Wwrite-strings -funroll-loops -Wstrict-prototypes -I. -Iinclude -fPIC -Ofast -DSVD_ACTIVATED=1 -DCTRLC=1  -DCOPYAMATRIX=1  -DLAPACK_LIB_FOUND -DUSE_LAPACK tests/c/test_runner_dir.c \
    -o out/UNIT_TEST_RUNNER_DIR out/obj/test_dummy.o \
    out/obj/test_broyden.o \
    out/obj/test_superscs.o \
    out/obj/test_utilities.o \
    out/libscsdir.a -lm -lrt -lblas -llapack
/usr/bin/ld: out/obj/test_dummy.o:/tmp/superscs/include/unit_test_util.h:60: multiple definition of `number_of_assertions'; /tmp/ccXkP6mv.o:/tmp/superscs/include/unit_test_util.h:60: first defined here
/usr/bin/ld: out/obj/test_broyden.o:/tmp/superscs/include/unit_test_util.h:60: multiple definition of `number_of_assertions'; /tmp/ccXkP6mv.o:/tmp/superscs/include/unit_test_util.h:60: first defined here
/usr/bin/ld: out/obj/test_superscs.o:/tmp/superscs/include/unit_test_util.h:60: multiple definition of `number_of_assertions'; /tmp/ccXkP6mv.o:/tmp/superscs/include/unit_test_util.h:60: first defined here
/usr/bin/ld: out/obj/test_utilities.o:/tmp/superscs/include/unit_test_util.h:60: multiple definition of `number_of_assertions'; /tmp/ccXkP6mv.o:/tmp/superscs/include/unit_test_util.h:60: first defined here
/usr/bin/ld: out/libscsdir.a(unit_test_util.o):/tmp/superscs/include/unit_test_util.h:60: multiple definition of `number_of_assertions'; /tmp/ccXkP6mv.o:/tmp/superscs/include/unit_test_util.h:60: first defined here
```
@nim65s
Copy link
Author

nim65s commented Aug 10, 2025

@kul-optec anybody is available to look at this ?

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

Successfully merging this pull request may close these issues.

1 participant