Opened 11 years ago

Closed 11 years ago

#43241 closed defect (fixed)

gnumeric build fails

Reported by: jwhowse4 Owned by: c.herbig@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: dbevans (David B. Evans), StanSanderson
Port: gnumeric

Description

I am using an Intel Mac Pro running Mac OS 10.8.5 (Mountain Lion) with XCode 5.1.0. After the recent upgrade to perl 5.16.3, macports tried to rebuild gnumeric due to a link failure to the old perl version. This build failed with the attached error log. When I looked into the failure I realized that the gnumeric portfile had been updated on 3/31/14. When I replaced that portfile with the previous portfile, the gnumeric build succeeds. Apparently the autoreconf is breaking the build on my system. I have attached the successful portfile as postfile.success and the failed portfile as portfile.failure.

Attachments (7)

gnumeric_main.log (221.3 KB) - added by jwhowse4 11 years ago.
gnumeric build log
Portfile_gnumeric.success (3.4 KB) - added by jwhowse4 11 years ago.
Portfile which succeeded
Portfile_gnumeric.failure (3.6 KB) - added by jwhowse4 11 years ago.
Portfile which failed
gnumeric_main_2.log (60.2 KB) - added by jwhowse4 11 years ago.
error log for new build
gnumeric_main_3.log (99.3 KB) - added by jwhowse4 11 years ago.
error log for newer build
Portfile_gnumeric.new (3.7 KB) - added by jwhowse4 11 years ago.
portfile for newer build
patch-gnumeric-warnings.diff (1.6 KB) - added by dbevans (David B. Evans) 11 years ago.
Proposed patch to disable compile warnings that break build.

Download all attachments as: .zip

Change History (20)

Changed 11 years ago by jwhowse4

Attachment: gnumeric_main.log added

gnumeric build log

Changed 11 years ago by jwhowse4

Attachment: Portfile_gnumeric.success added

Portfile which succeeded

Changed 11 years ago by jwhowse4

Attachment: Portfile_gnumeric.failure added

Portfile which failed

comment:1 Changed 11 years ago by dbevans (David B. Evans)

Using autoreconf apparently updated CFLAGS which uncovered the following flaw in the source code (as seen in your log):

:info:build analysis-frequency.c:155:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
:info:build                         dao_set_cell_printf (dao, col, 1, format, col);
:info:build                                                           ^~~~~~
:info:build 1 error generated.
:info:build make[4]: *** [analysis-frequency.lo] Error 1
:info:build make[4]: *** Waiting for unfinished jobs....
:info:build analysis-histogram.c:329:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
:info:build                         dao_set_cell_printf (dao, col, 1, format, col - to_col);
:info:build                                                           ^~~~~~
:info:build 1 error generated.
:info:build make[4]: *** [analysis-histogram.lo] Error 1

I've added a work-around in r118597 which suppresses the fatal error but this really should be reported upstream for correction in the code base.

This builds correctly on the buildbots but that only tests the default +x11 case.

Let me know if this fixes your problem.

comment:2 Changed 11 years ago by dbevans (David B. Evans)

Cc: devans@… added

Cc Me!

comment:3 Changed 11 years ago by dbevans (David B. Evans)

Cc: c.herbig@… removed
Owner: changed from macports-tickets@… to c.herbig@…

comment:4 in reply to:  1 Changed 11 years ago by jwhowse4

Replying to devans@…:

Using autoreconf apparently updated CFLAGS which uncovered the following flaw in the source code (as seen in your log):

:info:build analysis-frequency.c:155:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
:info:build                         dao_set_cell_printf (dao, col, 1, format, col);
:info:build                                                           ^~~~~~
:info:build 1 error generated.
:info:build make[4]: *** [analysis-frequency.lo] Error 1
:info:build make[4]: *** Waiting for unfinished jobs....
:info:build analysis-histogram.c:329:38: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
:info:build                         dao_set_cell_printf (dao, col, 1, format, col - to_col);
:info:build                                                           ^~~~~~
:info:build 1 error generated.
:info:build make[4]: *** [analysis-histogram.lo] Error 1

I've added a work-around in r118597 which suppresses the fatal error but this really should be reported upstream for correction in the code base.

This builds correctly on the buildbots but that only tests the default +x11 case.

Let me know if this fixes your problem.

It does not fix the problem for me. I have attached the error log generated by the new Portfile. It looks to me as if it is failing in the same way as before.

Changed 11 years ago by jwhowse4

Attachment: gnumeric_main_2.log added

error log for new build

comment:5 Changed 11 years ago by dbevans (David B. Evans)

Am I right in assuming that you're building with gtk3 +quartz?

comment:6 Changed 11 years ago by dbevans (David B. Evans)

I just tried building the port with +quartz -x11 +no_x11 and it built without error. I'm testing on 10.8.5 with Xcode 5.1.

So I am not able to reproduce the problem either using +x11 or +quartz.

Please be sure to upgrade your ports again and make a clean build. The fact that you got the same results indicates that you may not have the latest version of the port.

comment:7 in reply to:  5 Changed 11 years ago by jwhowse4

Replying to devans@…:

Am I right in assuming that you're building with gtk3 +quartz?

My installed gtk3 uses the the +x11 variant

comment:8 in reply to:  6 Changed 11 years ago by jwhowse4

Replying to devans@…:

I just tried building the port with +quartz -x11 +no_x11 and it built without error. I'm testing on 10.8.5 with Xcode 5.1.

So I am not able to reproduce the problem either using +x11 or +quartz.

Please be sure to upgrade your ports again and make a clean build. The fact that you got the same results indicates that you may not have the latest version of the port.

I did another selfupdate, the Portfile for gnumeric is dated 4/15/2014 at 15:30 which seems rather recent. I ran a clean to make sure there were no previous builds. The build still fails. I have attached the error log, which appears to contain the same failure. I have also attached the Portfile associated with this build.

Last edited 11 years ago by jwhowse4 (previous) (diff)

Changed 11 years ago by jwhowse4

Attachment: gnumeric_main_3.log added

error log for newer build

Changed 11 years ago by jwhowse4

Attachment: Portfile_gnumeric.new added

portfile for newer build

comment:9 Changed 11 years ago by dbevans (David B. Evans)

Ok, after looking at this periodically while working in the garden (you're competing with the honey-do list today), I see that configure.ac is appending its many compiler warning flags to CFLAGS during configure which is why my attempt to override the error in question failed. If you look at the failing compile command you can see my -Wno-error=format-nonliteral is followed by -Werror=format-security which overrides IT.

Attached is a patch to the most recent version of the Portfile in trunk that just disables the bulk of the warning flags allowing the build to succeed or at least that's what I see. Give it a try and if it fixes your problem then I'll commit it. Thanks for your patience.

Changed 11 years ago by dbevans (David B. Evans)

Proposed patch to disable compile warnings that break build.

comment:10 in reply to:  9 Changed 11 years ago by jwhowse4

Replying to devans@…:

Ok, after looking at this periodically while working in the garden (you're competing with the honey-do list today), I see that configure.ac is appending its many compiler warning flags to CFLAGS during configure which is why my attempt to override the error in question failed. If you look at the failing compile command you can see my -Wno-error=format-nonliteral is followed by -Werror=format-security which overrides IT.

Attached is a patch to the most recent version of the Portfile in trunk that just disables the bulk of the warning flags allowing the build to succeed or at least that's what I see. Give it a try and if it fixes your problem then I'll commit it. Thanks for your patience.

I applied the patch and now gnumeric builds successfully. Thank you for your help. I did not get around to applying the patch until today due to the honey-do's.

comment:11 Changed 11 years ago by StanSanderson

Cc: stansand@… added

Cc Me!

comment:12 Changed 11 years ago by c.herbig@…

Apparently I've been missing all emails pertaining to MacPorts. Unfortunately, due to now full-time employment along with continuing graduate work, I will not be able to fulfill my duties as a port maintainer. As there is no resign button, I will at some point have to get around to diff-ing the port files I volunteered for to remove myself as maintainer.

Meanwhile, there are all flagged as openmainainer, feel free to submit patches.

comment:13 Changed 11 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: newclosed

Patch committed in r118756.

Note: See TracTickets for help on using tickets.