LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2020, 06:39 AM   #1
binkyd
Member
 
Registered: Oct 2016
Distribution: Looking again
Posts: 429

Rep: Reputation: 40
Errors with "make"


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?
 
Old 09-11-2020, 06:55 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,057

Rep: Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349
I would suggest you to do something like this: https://gitlab.gnome.org/GNOME/libep...ac372c0a2b4261
Insert a similar line in util.c right above that line 57.
 
1 members found this post helpful.
Old 09-11-2020, 01:44 PM   #3
binkyd
Member
 
Registered: Oct 2016
Distribution: Looking again
Posts: 429

Original Poster
Rep: Reputation: 40
Thanks.
But I don't quite know which lines to add; when I take a look at that file, I see a "{" at line 27, with the next one at line 47 - "}"

Or would I just want lines 43 and 46 ?

Been a long time since I did any programming and now vague on syntax rules.
 
Old 09-12-2020, 09:35 AM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,631

Rep: Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557Reputation: 2557

Putting the error message into a search engine brings up another pretty clear answer:
Quote:
Originally Posted by https://aur.archlinux.org/packages/alarm-clock-applet/
To get rid of the -Werror=format-y2k.
Just edit the PKGBUILD and put "--enable-compile-warnings=no" at the end of the ./configure line on build()

Quote:
Originally Posted by binkyd View Post
But I don't quite know which lines to add; when I take a look at that file, I see a "{" at line 27, with the next one at line 47 - "}"

Or would I just want lines 43 and 46 ?

Been a long time since I did any programming and now vague on syntax rules.
As pan64 pointed out - the erroring line is 57 - so immediately before that line you put the first two pragmas and immediately after it you put the third one.

If it doesn't work, you can just revert the file and try again, or - if you don't want to modify the code - disable all warnings instead.


Last edited by boughtonp; 09-12-2020 at 09:40 AM.
 
Old 09-13-2020, 09:22 AM   #5
binkyd
Member
 
Registered: Oct 2016
Distribution: Looking again
Posts: 429

Original Poster
Rep: Reputation: 40
Thanks - but I'm out of my depth, and will find something different to do the job..
What you're telling me might seem obvious, but I guess I'm thick.
 
Old 09-14-2020, 01:43 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,057

Rep: Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349Reputation: 7349
you have an error using strftime. In the example I posted there is an strftime call too, and added 2 lines before and 1 line after. That is the fastest solution I could imagine.
The other one could be to modify the build system, but that would be much more difficult.
 
Old 09-14-2020, 07:01 AM   #7
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by binkyd View Post
Thanks - but I'm out of my depth, and will find something different to do the job..
What you're telling me might seem obvious, but I guess I'm thick.
You've got this far, don't give up, I'd never used make before and I wanted to install an older release of ffmpeg - it had many errors but using DDG (DuckDuckGo) and starting with the first error and solving it is the way to learn, it may be a bit confusing but once you've worked your way through it and taken notes you'll learn how Linux works. Good luck
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error """make:*** no rule to make target 'modules'.stop'"" SI1 Linux - Newbie 1 11-01-2017 11:57 PM
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
Constant errors during "make" or "make install" with SUSE 10.1 Alpha 4 TehFlyingDutchman Linux - Software 3 12-30-2005 06:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration