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

Can't compile on ubuntu 18.04 #34

Open
naren-nallapareddy opened this issue Jul 12, 2019 · 8 comments
Open

Can't compile on ubuntu 18.04 #34

naren-nallapareddy opened this issue Jul 12, 2019 · 8 comments
Labels
bug bug report linux linux operating system

Comments

@naren-nallapareddy
Copy link

I tried make in ubuntu 18.04, I get error

include/util_time.h:6:19: error: field ‘tic’ has incomplete type
struct timespec tic;
^~~
include/util_time.h:7:19: error: field ‘toc’ has incomplete type
struct timespec toc;

It seems I am not able to use struct timespec, I converted it into timeval and it works. Is there a reason timespec doesn't work in ubuntu?

@naren-nallapareddy
Copy link
Author

Also I get 3 errors when I run 'make run-test'

(Test SuperSCS (0,0,1) with FPR) -- y should be nan

(Test SuperSCS (0,0,1) with R-Broyden) -- y should be nan

(Test residuals) -- rel gap [0] not NAN

@alphaville alphaville added bug bug report linux linux operating system labels Jul 14, 2019
@kunyuan827
Copy link

I got the same error when using Ubuntu 18.04. Any suggestions? Many thanks!

@kunyuan827
Copy link

Also I get 3 errors when I run 'make run-test'

(Test SuperSCS (0,0,1) with FPR) -- y should be nan

(Test SuperSCS (0,0,1) with R-Broyden) -- y should be nan

(Test residuals) -- rel gap [0] not NAN

Hi naren3491, did you figure out how to solve these errors?

@alphaville
Copy link
Member

alphaville commented Jul 19, 2019

Hi @naren3491 and @kunyuan827. Sorry for the late reply, I was out of office for a few days. This issue must be related to issue #29. You can certainly ignore the failing tests - the issue is related with the tests themselves rather that the code of SuperSCS.

I had started the branch fix/xenial, but I then had to shift my priorities, but I'll try to fix this soon.

@naren-nallapareddy
Copy link
Author

Hi @alphaville , Thanks for your reply.

"You can certainly ignore the failing tests - the issue is related with the tests themselves rather that the code of SuperSCS." Thanks for clarifying! That helps.

Regards,
Naren

@kunyuan827
Copy link

Hi @naren3491 and @kunyuan827. Sorry for the late reply, I was out of office for a few days. This issue must be related to issue #29. You can certainly ignore the failing tests - the issue is related with the tests themselves rather that the code of SuperSCS.

I had started the branch fix/xenial, but I then had to shift my priorities, but I'll try to fix this soon.

Hi @alphaville , thanks for your reply. You're right. I ignored the test errors and the code works well until now.

@Ununnilium
Copy link

I had the same problem with Debian 10. I could compile it with simply removing -std=c99 in scs.mk at line 53.

@hankyang94
Copy link

I tried make in ubuntu 18.04, I get error

include/util_time.h:6:19: error: field ‘tic’ has incomplete type
struct timespec tic;
^~~
include/util_time.h:7:19: error: field ‘toc’ has incomplete type
struct timespec toc;

It seems I am not able to use struct timespec, I converted it into timeval and it works. Is there a reason timespec doesn't work in ubuntu?

Can you share a working script that shows how to convert timespec into timeval? I am not very familiar with C++.

nim65s added a commit to nim65s/superscs that referenced this issue Aug 2, 2024
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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug report linux linux operating system
Projects
None yet
Development

No branches or pull requests

5 participants