SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
@Gilbert: Apologies for the harassment, either I'm being dense or I'm finding all the corner cases. I'm trying to compile mod_perl which normally takes the following for its configure options:
perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs
However, src2pkg doesn't seem to handle the additional MP_APXS option - I get the following error:
Correcting source permissions - Done
Found perl Makefile.PL - Running perl Makefile.PL -n
Reading Makefile.PL args from @ARGV
no conflicting prior mod_perl version found - good.
Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.
This means that the MP_APXS option is not being parsed. I've tried doing a base script and then editing it but no luck there - same issue. Tried using double quotes and character escape ( \ ) but no luck either.
I noticed that your examples do a lot of extra stuff after the fake_install section - would it not be better to do it make_doinst and make_package?
Finally, to get this going, I've commented out CONFIG_COMMAND and configure_src and put:
cd $SRC_DIR
perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs
directly after it. That seems to do the trick - is that ok? Also, had to use FORCE_ZERO_LENGTH=YES otherwise a whole bunch of files are removed and that might not be a good thing.
Yeah, the handling of perl modules is just straight forward. I've not worked with them that much, so I was unaware that some needed options passed to them. This routine does not respond to extra otpions. Your solution is the correct one -just pluck out that offending eye, I mean comment out the offending instruction and replace with (usually) the exact same code you'd use from the command line -sometimes you have to make sure you are in the right place by putting 'cd $SRC_DIR) before starting. Each routine assures it is in the right place before doing anything, but less care is taken about ensuring that the function exits to the same location it started from.
I probably need to set FORCE_ZERO_LENGTH=YES any time a perl module is built -it seems that they nearly all contain empty place-holder files.
Do you mean do all extra steps just before running make_package? Of course you can do it that way, but I find it more sensible to group the commands more closely with the 'natural' order you'd do it manually. Also, because of all the extra things src2pkg does after fake_install it makes sense to do things earlier. For instance, if you need to add extra programs or scripts in with the binarioes which are installed by make install, if you do that just after fake_install runs, then src2pkg will take care of checking the perms and ownership of them.
All the little things that src2pkg does after running make install are the most important of all, as they (try to) assure package sanity and completeness.
Here's a fix for that -I'd appreciate it if you try it out -I don't have apaches sources to try this out completely, but it appears to be working.
You need to edit /usr/libexec/src2pkg/06-configure_source lines starting at 416 from this:
Code:
elif [[ -f $CONFIG_DIR/Makefile.PL ]] ; then
echo $BLUE"Found perl Makefile.PL - "$NORMAL"Running perl Makefile.PL -n"
cd $CONFIG_DIR;
perl Makefile.PL -n
# set this because perl modules usually conatin empty place-holder files
FORCE_ZERO_LENGTH=YES
to this:
Code:
elif [[ -f $CONFIG_DIR/Makefile.PL ]] ; then
echo $BLUE"Found perl Makefile.PL - "$NORMAL"Running perl Makefile.PL -n"
cd $CONFIG_DIR;
if [[ $MAKE_COMMAND != "" ]] ; then
echo $BLUE"Compiling perl module using: "$NORMAL $MAKE_COMMAND
$MAKE_COMMAND
else
echo $BLUE"Compiling perl module using: "$NORMAL "perl Makefile.PL -n $EXTRA_CONFIGS"
perl Makefile.PL -n $EXTRA_CONFIGS
fi
# set this because perl modules usually contain empty place-holder files
FORCE_ZERO_LENGTH=YES
# this is a safer bet than DESTDIR
INSTALL_TYPE=JAIL
This will let you do what you want two different ways:
You can either set MAKE_COMMAND to the full line, just like you use from the command line:
MAKE_COMMAND="perl Makefile.PL MP_APXS=/opt/apache2/bin/apxs"
or set EXTRA_CONFIGS like this:
EXTRA_CONFIGS="MP_APXS=/opt/apache2/bin/apxs"
src2pkg will then compose that to:
"perl Makefile.PL -n MP_APXS=/opt/apache2/bin/apxs"
Let me know if that works as this will be useful for other modules.
Once the new release is out, it would be good to mention that variables can be passed using either method when compiling perl modules. But since the code is now built in, it shoulddn't be mentioned as a hack that the users needs to do(editing the code, I mean). I just suggested that rpedrica try it so that the code is tested before releasing. I am getting close to a release -it has been a long time and again the list of changes is quite long. Over the summer I moved which hasn't helped in getting a release out.
Once the new release is out, it would be good to mention that variables can be passed using either method when compiling perl modules. But since the code is now built in, it shoulddn't be mentioned as a hack that the users needs to do(editing the code, I mean). I just suggested that rpedrica try it so that the code is tested before releasing. I am getting close to a release -it has been a long time and again the list of changes is quite long. Over the summer I moved which hasn't helped in getting a release out.
Hi Gilbert,
Moves are horribly disruptive, but hopefully you like your new locale.
My last major project requiring compilation was when I installed Quantum GIS. The list of dependencies was huge and much of what I needed I built with src2pkg.
That was a few months ago, however, but I don't think there has been a new release of src2pkg since then. I look forward to the new release and continuing to help document src2pkg.
Were you able to figure out some of the cmake stuff that bedeviled me?
Yes, the cmake stuff has been in there for quite a long while. The list of changes is hugely long -the changelog has over 320 lines since the last release! Of course most of it is minor stuff and things that have changed and re-changed. Still there will be several items that need to be documented -I'll do my best to sum things up icely in the shorter CHANGES file, to make the wiki update easier. The last release was in February, so I am long overdue.
Thanks, we do like our new place -big garden for my four year old son to play in.
Yes, this is already in the code -I just wanted you to test it as it appeared to be working here. It has been so long since I released that it would be a shame to introduce a new piece of code without it having been tested a little. It's a minor change, but it only takes one bad character to spoil the whole thing...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.