LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2017, 11:03 AM   #1
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Rep: Reputation: Disabled
Automake variables resolution


I am a newbie and I am trying to learn from sourcecodes. Now I have problem understanding (for learn!) autotools: here I have some variables. In this following variable declaration-assignment

Code:
mousepad_CFLAGS = \
    $(GLIB_CFLAGS) \
    $(GTK_CFLAGS) \
    $(GTHREAD_CFLAGS) \
    $(GTKSOURCEVIEW_CFLAGS) \
    $(PLATFORM_CFLAGS) \
    -DMOUSEPAD_GSETTINGS_SCHEMA_DIR=\""$(datadir)/glib-2.0/schemas"\"
The variables GLIB_CFLAGS GTK_CFLAGS GTHREAD_CFLAGS GTKSOURCEVIEW_CFLAGS PLATFORM_CFLAGS were not declared. From where their origins?

Also at the bottom there is another undeclared variable reference:

Code:
@GSETTINGS_RULES@
 
Old 08-03-2017, 07:06 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,454
Blog Entries: 6

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Many of those, especially the CFLAGS variants are passed in from the build environment. Others may be generated by pkg-config or other autotools macros.

The last one, @GSETTINGS_RULES@, appears to be derived from the GSettings API, part of glib build environment.

Much of the notation and many of the macros and variables themselves are defined by the M4 macro language, or specifically the GNU M4 implementation.

You should also begin to work through the GNU AutoTools documentation for a complete understanding of how that all works.

Good luck!

Last edited by astrogeek; 08-03-2017 at 08:54 PM. Reason: typo
 
1 members found this post helpful.
Old 08-04-2017, 12:11 AM   #3
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Did'nt seem ... !

Don't seem that autoconfig set something to solve the symbol mousepad_window_get_type in the mousepad C source file mousepad-window.h row 46. Can you see the source so to help me?
How the symbol si referenced?
Function were not declared!
 
Old 08-04-2017, 02:28 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,235

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
You mean clairvoyance?
 
Old 08-04-2017, 03:18 AM   #5
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NevemTeve View Post
You mean clairvoyance?
NO, please see file
 
Old 08-04-2017, 03:44 AM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,454
Blog Entries: 6

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
You will need to provide more information before anyone can help you.

What are you trying to do?
What commands are you using which produce an error?
What is the exact error message?
Have you tried to search for that error message?
What file are you talking about, and how is it related to the problem you are having? Etc...

Please see the LQ Site FAQ for guidance in asking your questions, and this page, How To Ask Questions The Smart Way.

Members here are willing to help, but we cannot do your work for you and we cannot guess what your question is. Please help us help you.
 
2 members found this post helpful.
Old 08-04-2017, 03:56 AM   #7
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
I am trying lo learn programming reading sources. And I have a lot of problem, I am solving most of them; but here I have a broken symbol that I can't understand. I want understand all about programming, I will become a professional worker! I begin reading sources of xfce text editor: mousepad!

But there is that broken symbol never declared in files of mousepad sources!

See row 46 of file mousepad/mousepad-window-h :
GType mousepad_window_get_type (void) G_GNUC_CONST;

it is impossible to do a prototype of an inexistent function! And it is called by program

Last edited by Unaaaaab; 08-04-2017 at 04:02 AM.
 
Old 08-04-2017, 05:20 AM   #8
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,235

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Well, I think you have to face to hard reality: I cannot see the files on your computer
 
Old 08-04-2017, 05:31 AM   #9
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Please, can you download the sources of mousepad and help me?
 
Old 08-04-2017, 05:34 AM   #10
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,235

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
I have found this source package: https://github.com/codebrainz/mousep...ive/master.zip

It has neither 'configure' nor 'INSTALL' file; though it does have an 'autgen.sh'

It turns out, this program has numerous dependencies; once you fix them all, you get a compilation error:
Code:
mousepad-window.c:1055:58: error: 'mousepad_window_ui' undeclared (first use in this function)
   gtk_ui_manager_add_ui_from_string (window->ui_manager, mousepad_window_ui, mousepad_window_ui_length, NULL);
Though there is a mousepad-0.4 there, which does compile. For the first glance, it is much nicer than gedit.

Last edited by NevemTeve; 08-04-2017 at 07:32 AM.
 
1 members found this post helpful.
Old 08-04-2017, 02:15 PM   #11
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,454
Blog Entries: 6

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Quote:
Originally Posted by Unaaaaab View Post
I am trying lo learn programming reading sources. And I have a lot of problem, I am solving most of them; but here I have a broken symbol that I can't understand. I want understand all about programming, I will become a professional worker! I begin reading sources of xfce text editor: mousepad!
It is good that you are learning to program, but if learning only from reading other people's source code then you are on a very difficult path!

I would strongly suggest that you take a more organized and methodical approach to learning and begin by solidly learning the basic concepts and methods of a single language and some of the common tools such as GNU autotools first. There are many links at the top of the Programming forum and others here can recommend online sources if you have a specific interest.

Quote:
Originally Posted by Unaaaaab View Post
But there is that broken symbol never declared in files of mousepad sources!

See row 46 of file mousepad/mousepad-window-h :
GType mousepad_window_get_type (void) G_GNUC_CONST;

it is impossible to do a prototype of an inexistent function! And it is called by program
I direct you again to the links I provided in my first post. It is important that you learn how to form and ask questions in any forum setting. You need to provide the information necessary for others to fully understand your problem, and you need to respond directly when others ask for additional information, such as the questions I asked above which you have not yet answered.

Quote:
Originally Posted by Unaaaaab View Post
Please, can you download the sources of mousepad and help me?
It is not reasonable nor very polite to expect others to download and read through a complete source file, and more so when you do not even provide a link! NevemTeve has been nice enough to find a file which may be the same you are using, and provide a response, but that is far beyond what you should expect others to do!

In future, please put more effort into asking your questions, providing necessary details and responding to requests for additional information. Remember that everyone here volunteers their time, please respect that and help them make best use of that time.

Again, please review the LQ Site FAQ for guidance in asking your questions, and this page, How To Ask Questions The Smart Way.
 
Old 08-05-2017, 12:59 AM   #12
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by astrogeek View Post
It is good that you are learning to program, but if learning only from reading other people's source code then you are on a very difficult path!

I would strongly suggest that you take a more organized and methodical approach to learning and begin by solidly learning the basic concepts and methods of a single language and some of the common tools such as GNU autotools first. There are many links at the top of the Programming forum and others here can recommend online sources if you have a specific interest.



I direct you again to the links I provided in my first post. It is important that you learn how to form and ask questions in any forum setting. You need to provide the information necessary for others to fully understand your problem, and you need to respond directly when others ask for additional information, such as the questions I asked above which you have not yet answered.



It is not reasonable nor very polite to expect others to download and read through a complete source file, and more so when you do not even provide a link! NevemTeve has been nice enough to find a file which may be the same you are using, and provide a response, but that is far beyond what you should expect others to do!

In future, please put more effort into asking your questions, providing necessary details and responding to requests for additional information. Remember that everyone here volunteers their time, please respect that and help them make best use of that time.

Again, please review the LQ Site FAQ for guidance in asking your questions, and this page, How To Ask Questions The Smart Way.
My question is yet smart!
I ask how is possible to do prototype of a a UNdeclared function and call it. Use IDE features to find that function is called in the source file at a GObject creation code row
 
Old 08-05-2017, 03:37 AM   #13
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 4,454
Blog Entries: 6

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Quote:
Originally Posted by Unaaaaab View Post
My question is yet smart!
I ask how is possible to do prototype of a a UNdeclared function and call it. Use IDE features to find that function is called in the source file at a GObject creation code row
If you continue to ignore direct requests for information, and will not read the links you have been asked to review, you could lose the ability to post to these forums.

From the previously linked Site FAQ:

Quote:
If you are unwilling or unable to ask questions in a manner that allows us to help you, it's unlikely our community will be able to provide you a solution. Unfortunately, serial offenders who show wanton disregard for this request after multiple pointers may be asked to seek help elsewhere.
Please help us help you, and respect those volunteering assistance by responding to their requests for necessary information, and by showing some effort to understand and troubleshoot your problem yourself.
 
Old 08-06-2017, 04:11 AM   #14
Unaaaaab
Member
 
Registered: Jan 2017
Posts: 32

Original Poster
Rep: Reputation: Disabled
i Cannot install mousepad from source!

Code:
utente@JJjjo:~/Desktop/mousepad-master$ ls
AUTHORS          COPYING      mousepad                po      TODO
autogen.sh       m4           mousepad.desktop.in.in  README
configure.ac.in  Makefile.am  NEWS                    THANKS
utente@JJjjo:~/Desktop/mousepad-master$ ./autogen.sh 
autogen.sh: You don't seem to have the Xfce development tools installed on
            your system, which are required to build this software.
            Please install the xfce4-dev-tools package first, it is available
            from http://www.xfce.org/.
utente@JJjjo:~/Desktop/mousepad-master$ autoreconf
autoreconf: 'configure.ac' or 'configure.in' is required
utente@JJjjo:~/Desktop/mousepad-master$ mv configure.ac.in configure.ac
utente@JJjjo:~/Desktop/mousepad-master$ autoreconf
configure.ac:39: error: required file './compile' not found
configure.ac:39:   'automake --add-missing' can install 'compile'
configure.ac:25: error: required file './config.guess' not found
configure.ac:25:   'automake --add-missing' can install 'config.guess'
configure.ac:25: error: required file './config.sub' not found
configure.ac:25:   'automake --add-missing' can install 'config.sub'
configure.ac:31: error: required file './install-sh' not found
configure.ac:31:   'automake --add-missing' can install 'install-sh'
configure.ac:57: error: required file './ltmain.sh' not found
configure.ac:31: error: required file './missing' not found
configure.ac:31:   'automake --add-missing' can install 'missing'
Makefile.am:14: warning: '%'-style pattern rules are a GNU make extension
Makefile.am: error: required file './INSTALL' not found
Makefile.am:   'automake --add-missing' can install 'INSTALL'
mousepad/Makefile.am:87: error: HAVE_DBUS does not appear in AM_CONDITIONAL
mousepad/Makefile.am:119: error: HAVE_DBUS does not appear in AM_CONDITIONAL
mousepad/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
mousepad/Makefile.am: error: required file './depcomp' not found
mousepad/Makefile.am:   'automake --add-missing' can install 'depcomp'
autoreconf: automake failed with exit status: 1
utente@JJjjo:~/Desktop/mousepad-master$
 
Old 08-06-2017, 05:16 AM   #15
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,235

Rep: Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979Reputation: 979
Quote:
Please install the xfce4-dev-tools package first
doesn't this line give you a hint?

Edit: in my Debian8, I had to install these components:
Code:
apt-get install libxfce4ui-1-dev
apt-get install xfce4-dev-tools
apt-get install libgtksourceview-3.0-dev
apt-get install exo-utils

Last edited by NevemTeve; 08-06-2017 at 05:21 AM.
 
  


Reply

Tags
automake


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
Bash to find all placeholder variables in a file and replace will real variables spadez Programming 6 11-26-2013 12:24 PM
Bash Script: parse active process stderr, strip, dump into variables, use variables TimeFade Programming 1 02-13-2010 06:09 AM
Threads synchronisation problem (mutex variables and contitional variables) zahadumy Programming 6 12-07-2005 12:30 PM
Scribus installation problem, sez I need automake 1.6 when automake 1.9 is istalled Rockgod2099 Linux - Software 13 11-14-2004 06:37 PM
slackware 9 asking for automake 1.6 while i have automake 1.7 gtgoku Slackware 1 10-19-2003 08:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:58 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