Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766869 - app-admin/conky-1.11.6-r2::gentoo: /var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc:325:1: error: ‘MHD_Result’ does not name a type
Summary: app-admin/conky-1.11.6-r2::gentoo: /var/tmp/portage/app-admin/conky-1.11.6-r2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-24 13:11 UTC by Samuel Bernardo
Modified: 2021-01-26 23:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,38.19 KB, text/x-log)
2021-01-24 13:11 UTC, Samuel Bernardo
Details
emerge info (emerge.info,9.67 KB, text/plain)
2021-01-24 13:11 UTC, Samuel Bernardo
Details
emerge -pqv (emerge.pqv,619 bytes, text/plain)
2021-01-24 13:12 UTC, Samuel Bernardo
Details
New patch (conky-1.11.6-fpermissive.patch,1.36 KB, patch)
2021-01-24 17:12 UTC, Daniel Pielmeier
Details | Diff
conky.cc.rej (conky.cc.rej,1.36 KB, text/x-reject)
2021-01-25 11:15 UTC, Samuel Bernardo
Details
conky.cc (conky.cc,87.42 KB, text/x-c++src)
2021-01-25 11:16 UTC, Samuel Bernardo
Details
conky-1.11.6-fpermissive.patch (conky-1.11.6-fpermissive.patch,1.36 KB, patch)
2021-01-25 11:17 UTC, Samuel Bernardo
Details | Diff
build log (build.log,38.52 KB, text/x-log)
2021-01-26 00:41 UTC, Samuel Bernardo
Details
emerge info (emerge.info,9.67 KB, text/plain)
2021-01-26 00:41 UTC, Samuel Bernardo
Details
emerge -pqv (emerge.pqv,619 bytes, text/plain)
2021-01-26 00:41 UTC, Samuel Bernardo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Bernardo 2021-01-24 13:11:27 UTC
Created attachment 684444 [details]
build log

FAILED: src/CMakeFiles/conky.dir/conky.cc.o 
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L -I/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/3rdparty/toluapp/include -I. -I/usr/include/mysql -I/usr/include/freetype2 -I/usr/include/lua5.3 -Idata  -std=c++17 -std=gnu++17 -MD -MT src/CMakeFiles/conky.dir/conky.cc.o -MF src/CMakeFiles/conky.dir/conky.cc.o.d -o src/CMakeFiles/conky.dir/conky.cc.o -c /var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc
/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc:325:1: error: ‘MHD_Result’ does not name a type
  325 | MHD_Result sendanswer(void *cls, struct MHD_Connection *connection,
      | ^~~~~~~~~~
/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc: In member function ‘virtual void out_to_http_setting::lua_setter(lua::state&, bool)’:
/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc:349:39: error: ‘sendanswer’ was not declared in this scope
  349 |                                NULL, &sendanswer, nullptr, MHD_OPTION_END);
      |
Comment 1 Samuel Bernardo 2021-01-24 13:11:44 UTC
Created attachment 684447 [details]
emerge info
Comment 2 Samuel Bernardo 2021-01-24 13:12:00 UTC
Created attachment 684450 [details]
emerge -pqv
Comment 3 Ionen Wolkens gentoo-dev 2021-01-24 13:31:46 UTC
Does it still happen if you disable ccache?
Comment 4 Daniel Pielmeier gentoo-dev 2021-01-24 16:09:39 UTC
It has nothing to do with ccache. This has already been fixed in bug #736172 and it also needs to be applied to conky-1.11.6 as the upstream fix was applied after this release.
Comment 5 Daniel Pielmeier gentoo-dev 2021-01-24 16:58:08 UTC
Actually it is applied but incomplete. Hopefully I have time to fix this soon!
Comment 6 Daniel Pielmeier gentoo-dev 2021-01-24 17:12:44 UTC
Created attachment 684486 [details, diff]
New patch

In the meantime it would be great if you could test if this patch fixes the issue!
Comment 7 Samuel Bernardo 2021-01-25 00:41:20 UTC
(In reply to Daniel Pielmeier from comment #6)
> Created attachment 684486 [details, diff] [details, diff]
> New patch
> 
> In the meantime it would be great if you could test if this patch fixes the
> issue!

Thanks Daniel for your quick answers.
Sorry that I couldn't test yet. I will do it as I wake up in the morning.
Comment 8 Samuel Bernardo 2021-01-25 11:11:45 UTC
patching file src/conky.cc
Hunk #1 FAILED at 317.
1 out of 1 hunk FAILED -- saving rejects to file src/conky.cc.rej
 [ !! ]
 * ERROR: app-admin/conky-1.11.6-r2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/app-admin/conky-1.11.6-r2/conky-1.11.6-fpermissive.patch
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3212:  Called cmake_src_prepare
 *             environment, line 1427:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  376:  Called eapply_user
 *             environment, line 1608:  Called eapply '/etc/portage/patches/app-admin/conky-1.11.6-r2/conky-1.11.6-fpermissive.patch'
 *             environment, line 1578:  Called _eapply_patch '/etc/portage/patches/app-admin/conky-1.11.6-r2/conky-1.11.6-fpermissive.patch'
 *             environment, line 1516:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/app-admin/conky-1.11.6-r2/conky-1.11.6-fpermissive.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
Comment 9 Samuel Bernardo 2021-01-25 11:15:00 UTC
Created attachment 684603 [details]
conky.cc.rej
Comment 10 Samuel Bernardo 2021-01-25 11:16:10 UTC
Created attachment 684606 [details]
conky.cc
Comment 11 Samuel Bernardo 2021-01-25 11:17:40 UTC
Created attachment 684609 [details, diff]
conky-1.11.6-fpermissive.patch
Comment 12 Daniel Pielmeier gentoo-dev 2021-01-25 11:50:43 UTC
Strange it applies cleanly here! Can you also supply the build log?

Is it possible that you did apply the old patch before?
Comment 13 Ionen Wolkens gentoo-dev 2021-01-25 12:30:01 UTC
Reminder need to replace the original ebuild patch as it'd conflict if just added as a user patch.

That aside, originally I couldn't reproduce in ~arch (which made me wonder about ccache) but now I know to downgrade libmicrohttpd to reproduce (tried with 0.9.68-r1)

New patch did fix it on my end.
Comment 14 Daniel Pielmeier gentoo-dev 2021-01-25 12:39:14 UTC
(In reply to Ionen Wolkens from comment #13)
> Reminder need to replace the original ebuild patch as it'd conflict if just
> added as a user patch.
> 
> That aside, originally I couldn't reproduce in ~arch (which made me wonder
> about ccache) but now I know to downgrade libmicrohttpd to reproduce (tried
> with 0.9.68-r1)
> 
> New patch did fix it on my end.

User patch is probably the issue here, as the original patch is also applied. This is why I asked if it has been applied before.

Good to hear that it fixes the problem!
Comment 15 Samuel Bernardo 2021-01-25 13:59:31 UTC
Sorry the delay... I just lost the previous build log.
But it seems to be related to the previous applied patch... I can run again and share the build log if you need that.
Comment 16 Daniel Pielmeier gentoo-dev 2021-01-25 14:07:05 UTC
(In reply to Samuel Bernardo from comment #15)
> Sorry the delay... I just lost the previous build log.
> But it seems to be related to the previous applied patch... I can run again
> and share the build log if you need that.

I guess it is not needed any more as Ionen Wolkens already confirmed that the patch applies fine and fixes the build issue.
Comment 17 Larry the Git Cow gentoo-dev 2021-01-25 15:09:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3b2a9cd009ed396385ee00d32926b9307baf78f

commit e3b2a9cd009ed396385ee00d32926b9307baf78f
Author:     Daniel Pielmeier <billie@gentoo.org>
AuthorDate: 2021-01-25 15:08:45 +0000
Commit:     Daniel Pielmeier <billie@gentoo.org>
CommitDate: 2021-01-25 15:08:45 +0000

    app-admin/conky: Correct fix for building with libmicrohttpd.
    
    Thanks to Samuel Bernardo and Ionen Wolkens.
    
    Closes: https://bugs.gentoo.org/766869
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    Signed-off-by: Daniel Pielmeier <billie@gentoo.org>

 .../conky/files/conky-1.11.6-fpermissive.patch     | 28 ++++++++++------------
 1 file changed, 13 insertions(+), 15 deletions(-)
Comment 18 Daniel Pielmeier gentoo-dev 2021-01-25 15:11:19 UTC
I have applied the patch. It will take bit for the mirrors to catch up. So wait some time and then refresh your tree. Afterwards conky should build fine with libmicrohttpd.
Comment 19 Samuel Bernardo 2021-01-26 00:40:27 UTC
Sorry to reopen this issue, but it still fails after applying the patch.
Just added new logs in attachment.
Comment 20 Samuel Bernardo 2021-01-26 00:41:12 UTC
Created attachment 684684 [details]
build log
Comment 21 Samuel Bernardo 2021-01-26 00:41:36 UTC
Created attachment 684687 [details]
emerge info
Comment 22 Samuel Bernardo 2021-01-26 00:41:55 UTC
Created attachment 684690 [details]
emerge -pqv
Comment 23 Samuel Bernardo 2021-01-26 00:43:58 UTC
This is the error (already with ccache disabled):

[32/80] /usr/bin/x86_64-pc-linux-gnu-g++ -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L -I/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/3rdparty/toluapp/include -I. -I/usr/include/mysql -I/usr/include/freetype2 -I/usr/include/lua5.3 -Idata  -std=c++17 -std=gnu++17 -MD -MT src/CMakeFiles/conky.dir/conky.cc.o -MF src/CMakeFiles/conky.dir/conky.cc.o.d -o src/CMakeFiles/conky.dir/conky.cc.o -c /var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc
FAILED: src/CMakeFiles/conky.dir/conky.cc.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -D_LARGEFILE64_SOURCE -D_POSIX_C_SOURCE=200809L -I/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/3rdparty/toluapp/include -I. -I/usr/include/mysql -I/usr/include/freetype2 -I/usr/include/lua5.3 -Idata  -std=c++17 -std=gnu++17 -MD -MT src/CMakeFiles/conky.dir/conky.cc.o -MF src/CMakeFiles/conky.dir/conky.cc.o.d -o src/CMakeFiles/conky.dir/conky.cc.o -c /var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc
/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc:325:1: error: ‘MHD_Result’ does not name a type
  325 | MHD_Result sendanswer(void *cls, struct MHD_Connection *connection,
      | ^~~~~~~~~~
/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc: In member function ‘virtual void out_to_http_setting::lua_setter(lua::state&, bool)’:
/var/tmp/portage/app-admin/conky-1.11.6-r2/work/conky-1.11.6/src/conky.cc:349:39: error: ‘sendanswer’ was not declared in this scope
  349 |                                NULL, &sendanswer, nullptr, MHD_OPTION_END);
      |                                       ^~~~~~~~~~
Comment 24 Daniel Pielmeier gentoo-dev 2021-01-26 07:57:17 UTC
Are you really sure you got the changes. Everything is fine here. Please compare the patch attached to this bug with the one in your ebuild repository.
Comment 25 Samuel Bernardo 2021-01-26 13:19:09 UTC
I just ran a diff between the one I have in portage and the one attached here and don't get any difference:
diff /usr/portage/app-admin/conky/files/conky-1.11.6-fpermissive.patch conky-1.11.6-fpermissive.patch

I'm going to check what could be wrong.
Comment 26 Daniel Pielmeier gentoo-dev 2021-01-26 15:33:01 UTC
(In reply to Samuel Bernardo from comment #25)
> I just ran a diff between the one I have in portage and the one attached
> here and don't get any difference:
> diff /usr/portage/app-admin/conky/files/conky-1.11.6-fpermissive.patch
> conky-1.11.6-fpermissive.patch
> 
> I'm going to check what could be wrong.

Which version of libmicrohttpd are you using? I tested with the stable version 0.9.70-r1!
Comment 27 Samuel Bernardo 2021-01-26 22:50:53 UTC
(In reply to Daniel Pielmeier from comment #26)
> (In reply to Samuel Bernardo from comment #25)
> > I just ran a diff between the one I have in portage and the one attached
> > here and don't get any difference:
> > diff /usr/portage/app-admin/conky/files/conky-1.11.6-fpermissive.patch
> > conky-1.11.6-fpermissive.patch
> > 
> > I'm going to check what could be wrong.
> 
> Which version of libmicrohttpd are you using? I tested with the stable
> version 0.9.70-r1!

Sorry for the delay in my answer...
I'm using the same.
Comment 28 Samuel Bernardo 2021-01-26 23:05:10 UTC
Can't explain exactly what happen, but I just did a new portage sync and it compiled now with success.
So closing this issue.