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

Installation issue #6

Open
lim9gu opened this issue Oct 16, 2022 · 3 comments
Open

Installation issue #6

lim9gu opened this issue Oct 16, 2022 · 3 comments

Comments

@lim9gu
Copy link

lim9gu commented Oct 16, 2022

Hello,

I am trying to install hotpants in OS environment of Ubuntu 22.04.
I set the cfitsio include and lib path like;

CFITSIOINCDIR =  /usr/include/cfitsio/include
LIBDIR        =  /usr/include/cfitsio/lib

Referring the issue comment in #1,
I used the complier command changing c99 into gnu99;

gcc -funroll-loops -O3 -ansi -std=gnu99 -pedantic-errors -Wall -I/usr/include/cfitsio/include -D_GNU_SOURCE -c main.c

However, the "unused variable" error occurred.

 /usr/local/hotpants-master# gcc -funroll-loops -O3 -ansi -std=gnu99 -pedantic-errors -Wall -I/usr/include/cfitsio/include -D_GNU_SOURCE  -c main.c 
main.c: In function ‘main’:
main.c:21:59: warning: "/*" within comment [-Wcomment]
   21 |     /*double      meanksumSubstamps,scatterksumSubstamps; /* mean and scatter of ksum */
      |                                                            
main.c:562:38: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 4 [-Wformat-overflow=]
  562 |             sprintf(ttype[k], "Region%d", k);
      |                                      ^~
main.c:562:31: note: directive argument in the range [0, 2147483646]
  562 |             sprintf(ttype[k], "Region%d", k);
      |                               ^~~~~~~~~~
In file included from /usr/include/stdio.h:894,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output between 8 and 17 bytes into a destination of size 10
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~
main.c:1870:30: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-overflow=]
 1870 |         sprintf(hInfo, "%s %s", hInfo, argv[i]);
      |                              ^
In file included from /usr/include/stdio.h:894,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:38:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 2049) into a destination of size 2048
   38 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   39 |                                   __glibc_objsize (__s), __fmt,
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   40 |                                   __va_arg_pack ());
      |                                   ~~~~~~~~~~~~~~~~~

I found the unused variable error occurs when the defined variable is not used in the code.

Can somebody help me?

@jehos
Copy link

jehos commented Jun 25, 2023

I submitted PR #7 to solve this problem.. @acbecker

@BrunoSanchez
Copy link

I was also struggling with this.

Thanks I will try to test your fix (PR #7)!

@jehos
Copy link

jehos commented Jul 3, 2023

@BrunoSanchez

You can install it using snap.

sudo snap install hotpants --edge

However, the snap version has several limitations.

If you can't ignore the limitations of the snap version, use the docker version.

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

No branches or pull requests

3 participants