LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-13-2019, 12:23 PM   #1
ahmed bedair
LQ Newbie
 
Registered: Jun 2019
Posts: 29

Rep: Reputation: Disabled
very strange error in greeter light dm configure


Dear while configure greeter light dm i got this error
lightdm-gtk-greeter.c:447:41: error: cast between incompatible function types from 'void (*)(GPid, gboolean)' {aka 'void (*)(int, int)'} to 'void (*)(void *, void *)' [-Werror=cast-function-type]
I tried to disable werror it works to install but light dm failed to start

Last edited by ahmed bedair; 07-13-2019 at 12:26 PM.
 
Old 07-13-2019, 01:35 PM   #2
ahmed bedair
LQ Newbie
 
Registered: Jun 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Xserver was missing
Thanks a lot
 
Old 07-14-2019, 04:56 AM   #3
xuanloctn
LQ Newbie
 
Registered: Jul 2019
Posts: 2

Rep: Reputation: Disabled
I got the analogous error when compiling lightdm-gtk-greeter-2.0.3.tar.gz


make[3]: Entering directory '/sources/lightdm-1.24.0/lightdm-gtk-greeter-2.0.3/src'
CC lightdm_gtk_greeter-lightdm-gtk-greeter.o
lightdm-gtk-greeter.c: In function ‘sigterm_cb’:
lightdm-gtk-greeter.c:447:41: error: cast between incompatible function types from ‘void (*)(GPid, gboolean)’ {aka ‘void (*)(int, int)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]
g_slist_foreach (pids_to_close, (GFunc)close_pid, GINT_TO_POINTER (FALSE));
^
lightdm-gtk-greeter.c: In function ‘menu_command_run’:
lightdm-gtk-greeter.c:927:77: error: cast between incompatible function types from ‘void (*)(GtkWidget *)’ {aka ‘void (*)(struct _GtkWidget *)’} to ‘void (*)(GtkWidget *, void *)’ {aka ‘void (*)(struct _GtkWidget *, void *)’} [-Werror=cast-function-type]
gtk_container_foreach (GTK_CONTAINER (command->widget), (GtkCallback)gtk_widget_destroy, NULL);
^
lightdm-gtk-greeter.c: In function ‘reassign_menu_item_accel’:
lightdm-gtk-greeter.c:1489:57: error: cast between incompatible function types from ‘void (*)(GtkWidget *)’ {aka ‘void (*)(struct _GtkWidget *)’} to ‘void (*)(GtkWidget *, void *)’ {aka ‘void (*)(struct _GtkWidget *, void *)’} [-Werror=cast-function-type]
gtk_container_foreach (GTK_CONTAINER (submenu), (GtkCallback)reassign_menu_item_accel, NULL);
^
lightdm-gtk-greeter.c: In function ‘main’:
lightdm-gtk-greeter.c:2756:33: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Werror=cast-function-type]
g_unix_signal_add (SIGTERM, (GSourceFunc)sigterm_cb, /* is_callback */ GINT_TO_POINTER (TRUE));
^
lightdm-gtk-greeter.c:3152:40: error: cast between incompatible function types from ‘gboolean (*)(void)’ {aka ‘int (*)(void)’} to ‘gboolean (*)(void *)’ {aka ‘int (*)(void *)’} [-Werror=cast-function-typ]
gdk_threads_add_timeout (1000, (GSourceFunc) clock_timeout_thread, NULL);
^
cc1: all warnings being treated as errors
make[3]: *** [Makefile:536: lightdm_gtk_greeter-lightdm-gtk-greeter.o] Error 1
make[3]: Leaving directory '/sources/lightdm-1.24.0/lightdm-gtk-greeter-2.0.3/src'
make[2]: *** [Makefile:415: all] Error 2
make[2]: Leaving directory '/sources/lightdm-1.24.0/lightdm-gtk-greeter-2.0.3/src'
make[1]: *** [Makefile:452: all-recursive] Error 1
make[1]: Leaving directory '/sources/lightdm-1.24.0/lightdm-gtk-greeter-2.0.3'
make: *** [Makefile:384: all] Error 2


I am using glibc-2.28 and gcc-8.2.0.
Could anyone help?


Thanks

Last edited by xuanloctn; 07-14-2019 at 06:38 AM.
 
Old 07-14-2019, 07:09 AM   #4
ahmed bedair
LQ Newbie
 
Registered: Jun 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Please add disable-werror to configure this fixed the issue to me
What I understood this case happened because warning is counted as error because of werror
 
Old 07-14-2019, 09:54 AM   #5
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,020
Blog Entries: 7

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
This should be reported on the mailing list. It looks like a glitch in the book.
 
Old 07-14-2019, 09:56 AM   #6
ahmed bedair
LQ Newbie
 
Registered: Jun 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Thanks a lot but do you think disabling werror did fix the situation?
Specially that i didn't get any error on ligthdm start in greeter
 
Old 07-14-2019, 10:16 AM   #7
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,020
Blog Entries: 7

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Well, it looks like it. Those "error" messages you show look like warnings to me. Type mismatches are a very common source of warning. gcc can ignore the incompatibility and simply change the type of the value to fit the location it's going to be stored in, but it always warns first in case the problem is actually due to someone mistyping something. Of course a warning like that is only useful to the original programmer, not to other users of the program.

But ordinary builds shouldn't have -Werror set. It is set by default when building very basic tools like binutils. If you look at the build instructions for binutils in LFS, you will see that you have to disable -Werror to make the build work at all. But it certainly shouldn't be set for something like lightdm. So either the lightdm build instructions are abnormally finicky (in which case the BLFS team should know about this) or you have -Werror set in your default flags (which it shouldn't be). Do you have CFLAGS set in your environmental variables? If so, echo $CFLAGS should show you something.
 
Old 07-14-2019, 10:19 AM   #8
ahmed bedair
LQ Newbie
 
Registered: Jun 2019
Posts: 29

Original Poster
Rep: Reputation: Disabled
Thanks a lot
I didn't change anything but the werror flag to be disabled and until now i have no error in greeter or lightdm but the graphic driver needed to be installed and adding virtual driver support to the kernal

Last edited by ahmed bedair; 07-14-2019 at 10:20 AM.
 
Old 07-14-2019, 09:52 PM   #9
xuanloctn
LQ Newbie
 
Registered: Jul 2019
Posts: 2

Rep: Reputation: Disabled
I wonder why gcc marks those warnings as errors?
Is there any issue caused at runtime when disabling the incompatible function types warnings?
 
Old Yesterday, 05:46 AM   #10
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,020
Blog Entries: 7

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
Quote:
Originally Posted by xuanloctn View Post
I wonder why gcc marks those warnings as errors?
Is there any issue caused at runtime when disabling the incompatible function types warnings?
Well, that's the puzzle. Most builds don't treat warnings as errors by default. In the case of a mismatch, gcc just changes the type on the right hand side to make it match. Usually this causes no problems at run time because types that are deliberately equated by the programmer tend to be compatible. It can cause a bug though if the reason the types don't match is that the programmer used the wrong variable name!

A good rule, I've found, is to ignore warnings when building someone else's package but track them down ruthlessly when it's your own.
 
1 members found this post helpful.
Old Yesterday, 08:34 AM   #11
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 12,796

Rep: Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018Reputation: 4018
Quote:
Originally Posted by xuanloctn View Post
I wonder why gcc marks those warnings as errors?
Is there any issue caused at runtime when disabling the incompatible function types warnings?
because it is forced to do that. The incompatibility [in general] may cause segmentation faults or other strange errors. But as a user you cannot do anything. This is mainly useful for the developers.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Search very light linux for very weak computer Johnson8 Linux - Distributions 47 01-07-2019 01:51 AM
[SOLVED] Changed my display manager to light-gtk-greeter. Now I can't login. marinecomm Ubuntu 1 08-31-2013 09:13 AM
My computer is very, very old. What's a light version of Linux that I can use? xMaximus Linux - Newbie 20 01-26-2010 07:14 AM
Need a very light linux distribution (seriously, very very light) dafrazzman Linux - Distributions 7 08-06-2009 05:46 AM
A very very very very big problem!! Elbryan Linux - Software 2 09-23-2005 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 01:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration