LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-10-2015, 09:12 AM   #1
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036
how to "make" (configure, compile and install)?


hello,

i have modified a plugin for fbpanel (coded in c) and would like to offer it for others (and myself) to compile and install to /usr/lib/fbpanel.
the plugin compiles nicely when i put it into the locally downloaded fbpanel github repo ( https://github.com/naihe2010/fbpanel ) and use all the configure/make scripts from there, but i can't for the love of god figure out how to create a "make" file to only compile that one plugin...

could someone lend me a helping hand please?
i have created a github repository here:
https://github.com/ohnonot/fbpanel-genmon2

thanks.

Last edited by ondoho; 07-10-2015 at 09:13 AM.
 
Old 07-12-2015, 03:02 AM   #2
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
Now,... That's not much of a makefile on your GitHub,... Now is it???

Your dependencies? Your includes? You just mimic the makefile in the top level of that repository without looking at what is going on underneath...

You need to look at and understand what the original repository is doing to build the whole package... (Hint: It's a whole lot more than what you have copied into your repository).

How long have you been coding, exactly???

Start here, for basic makefiles:
http://www.cs.colby.edu/maxwell/cour...als/maketutor/

Last edited by JaseP; 07-12-2015 at 03:08 AM.
 
Old 07-12-2015, 06:28 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036
jaseP, thanks for taking an interest.

you are quite right in all points.

my experiences with c and compiling are practically zero.

i was indeed hoping that someone would walk me through the process and help to copy the appropriate files over from the original repository.

thanks so far for the link to the tutorial.
i will take a look and see what i can use, but without further pointers in the right direction, i fear that i have a very long road ahead of me.
 
Old 07-12-2015, 01:42 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036
I had a closer look at everything and started copying header files, the complete .config directory and some more over from the original repo.
of course i did some more adjustments. it is working with the classical "./configure, make, sudo make install" now - at least on my system.
If you could take another look and maybe tell me where i went wrong, or where i can prune things more, or what else i overlooked in my ignorance.

btw, can you identify what sort of configure/make system the original fbpanel repo, where i copied everything from, uses? these python scripts in .config, i haven't seen anything like it.
 
Old 07-12-2015, 02:49 PM   #5
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,659

Rep: Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998
Quote:
Originally Posted by ondoho View Post
btw, can you identify what sort of configure/make system the original fbpanel repo, where i copied everything from, uses? these python scripts in .config, i haven't seen anything like it.
There's a reference in the script to https://github.com/aanatoly/miniconf
 
Old 07-13-2015, 05:11 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036
Quote:
Originally Posted by ntubski View Post
There's a reference in the script to https://github.com/aanatoly/miniconf
thanks, i missed that.
do you think it's necessary or even advisable for the minor task of compiling a plugin?
right now, my fbpanel-genmon2 repo consists of 78% python (=miniconf) and only 15% C (=the actual plugin code)...
 
Old 07-13-2015, 05:43 AM   #7
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,659

Rep: Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998
Quote:
Originally Posted by ondoho View Post
do you think it's necessary or even advisable for the minor task of compiling a plugin?
right now, my fbpanel-genmon2 repo consists of 78 python (=miniconf) and only 15% C (=the actual plugin code)...
Do you know what flags are needed to compile the C code? Do you know what flags will be needed on other system to compile the C code? That's what configure scripts are for: to collect the right paths and flags needed to compile (and also if your code has some options set by defines, configure scripts give a convenient way to set them).

To be clear, those were not rhetorical questions, it's possible your code is simple enough that you can use the same set of flags everywhere. In that case you don't need a configure script. Although, since you say it's a plugin, I would guess you'll need some configurating magic to find out where/how the user installed the thing you're plugging in to.

Last edited by ntubski; 07-13-2015 at 05:43 AM. Reason: missed word
 
Old 07-13-2015, 06:05 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036Reputation: 6036
no, and no.
so i guess it's good to leave that python script in there.
and no, it doesn't check for the currently installed version of fbpanel. but since there's not much development for fbpanel, and it hasn't changed anyway in recent years, i guess that's ok.

thanks for your interest & allowing me to be a lateral entrant on this.
 
  


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
configure: error: Can't find "javac" in your PATH, when install/compile a program... JungMin Programming 5 12-07-2005 06:04 PM
configure: error: Can't find "javac" in your PATH, when install/compile a program... JungMin Linux - Software 4 12-06-2005 12:20 AM
BASH problems: "configure, make, make install" commands don't work ditch* Linux - General 3 07-19-2005 05:37 PM
compiling tar.bz2... "./configure make make install" doesn't work dodo1983 Linux - Newbie 7 08-17-2004 01:34 AM

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

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