Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Errors with "make"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
cugisove
n00b
n00b


Joined: 18 May 2020
Posts: 1
Location: Lake Ozark

PostPosted: Mon Sep 14, 2020 8:13 am    Post subject: Errors with "make" Reply with quote

When trying to compile a small app, I get these errors, and I can't find out how to fix them.

Code:
make[3]: Entering directory '/home/binkyd/Downloads/Alarm-Clock/alarm-clock-applet-0.3.4/src'
  CC       util.o
util.c: In function ‘get_alarm_timestamp’:
util.c:57:31: error: ‘%c’ yields only last 2 digits of year in some locales [-Werror=format-y2k]
   57 |  strftime (tmp, sizeof (tmp), "%c", tm);
      |                               ^~~~
cc1: some warnings being treated as errors
make[3]: *** [Makefile:474: util.o] Error 1
make[3]: Leaving directory '/home/binkyd/Downloads/Alarm-Clock/alarm-clock-applet-0.3.4/src'
make[2]: *** [Makefile:494: all-recursive] Error 1
make[2]: Leaving directory '/home/binkyd/Downloads/Alarm-Clock/alarm-clock-applet-0.3.4/src'
make[1]: *** [Makefile:411: all-recursive] Error 1
make[1]: Leaving directory '/home/binkyd/Downloads/Alarm-Clock/alarm-clock-applet-0.3.4'
make: *** [Makefile:350: all] Error 2


I've looked in the gcc manual and the man files etc but am lost.
Looking at Arch Pkgbuild hasn't helped yet, either.

Where do I find out what these are about so I can maybe fix it?
Back to top
View user's profile Send private message
Ionen
Veteran
Veteran


Joined: 06 Dec 2018
Posts: 1247

PostPosted: Mon Sep 14, 2020 8:50 am    Post subject: Reply with quote

Haven't tried building but looking at the mentioned PKGBUILD, it seems to disable -Werror using --enable-compile-warnings=no on ./configure
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1184
Location: Italy

PostPosted: Mon Sep 14, 2020 10:05 am    Post subject: Reply with quote

@cugisove: see the strftime(3) man page, section BUGS:
Quote:
Nowadays, gcc(1) provides the -Wno-format-y2k option to prevent the warning, so that the above workaround is no longer required.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15967

PostPosted: Mon Sep 14, 2020 5:27 pm    Post subject: Reply with quote

As a tip, the current thread title (Errors with "make") is not a good choice for attracting helpful answers. Your problem is that gcc issued a particular warning, which was promoted to an error. The use of make to run the command that ultimately failed is an implementation detail, and not relevant to the problem. You would get the same error if you ran that gcc command by hand. You have gotten good answers anyway, but in the future, a more specific title may be important to getting prompt and topical answers.

You can change the thread title by editing the first post of the thread.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum