Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: add install target #38

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

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.

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
```
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