Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519224 - www-apache/mod_fcgid-2.3.9-r1 fails to install
Summary: www-apache/mod_fcgid-2.3.9-r1 fails to install
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL: https://github.com/Homebrew/homebrew-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-06 15:27 UTC by iloveosxzfs
Modified: 2021-01-06 20:18 UTC (History)
1 user (show)

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


Attachments
build log (build.log,11.75 KB, application/octet-stream)
2014-08-06 15:27 UTC, iloveosxzfs
Details
emerge info (emerge-info-mod_fcgid.txt,14.42 KB, text/plain)
2014-08-06 15:35 UTC, iloveosxzfs
Details
emerge pqv (emerge-pqv-mod_fcgid.txt,161 bytes, text/plain)
2014-08-06 15:35 UTC, iloveosxzfs
Details
second build log (second_build.log,6.75 KB, application/octet-stream)
2014-08-06 15:46 UTC, iloveosxzfs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description iloveosxzfs 2014-08-06 15:27:58 UTC
Created attachment 382388 [details]
build log

After keywording mod_fcgid, the compilation phase completes, but we die during install.

doexe: /Users/joe/gentoo/var/tmp/portage/www-apache/mod_fcgid-2.3.9-r1/work/mod_fcgid-2.3.9/.libs/mod_fcgid.so does not exist


But it turns out that if we run configure from outside of prefix, then the install phase succeeds.

In prefix:
cd ${EPREFIX}
ebuild usr/portage/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild clean
ebuild usr/portage/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild prepare


Outside of prefix:
cd ${EPREFIX}/var/tmp/portage/www-apache/mod_fcgid-2.3.9-r1/work/mod_fcgid-2.3.9
./configure.apxs

And back in prefix:
cd ${EPREFIX}
touch var/tmp/portage/www-apache/mod_fcgid-2.3.9-r1/.configured
ebuild usr/portage/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild install
ebuild usr/portage/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild qmerge
Comment 1 iloveosxzfs 2014-08-06 15:31:13 UTC
It is worth noting that Homebrew just explicitly installs mod_fcgid.so

  def install
    system "./configure.apxs"
    system "make"
    libexec.install 'modules/fcgid/.libs/mod_fcgid.so'
  end

https://github.com/Homebrew/homebrew-apache/blob/a1a7bdd78c044d0402a75835c9b2a3396422b9af/mod_fcgid.rb
Comment 2 iloveosxzfs 2014-08-06 15:35:36 UTC
Created attachment 382390 [details]
emerge info
Comment 3 iloveosxzfs 2014-08-06 15:35:58 UTC
Created attachment 382392 [details]
emerge pqv
Comment 4 iloveosxzfs 2014-08-06 15:46:09 UTC
Also important to note that the workaround above (i.e., running the configure phase outside of prefix) will only work once you've also followed the troubleshooting directions here:



that in order to get it to build when configure has been run outside of the prefix (the workaround above), you also need to follow the troubleshooting instructions:
https://github.com/Homebrew/homebrew-apache

Until following those instructions, you get
env: env: env: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc: No such file or directory: No such file or directory: No such file or directory

("second build log" attached)

In particular, the troubleshooting instructions suggest the following workaround:
sw_vers -productVersion | grep -E '^10\.[89]' > /dev/null && bash -c "[ -d /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain ] && sudo -u $(ls -ld /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain | awk '{print $3}') bash -c 'ln -vs XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX$(sw_vers -productVersion | cut -c-4).xctoolchain' || sudo bash -c 'mkdir -vp /Applications/Xcode.app/Contents/Developer/Toolchains/OSX$(sw_vers -productVersion | cut -c-4).xctoolchain/usr && ln -s /usr/bin /Applications/Xcode.app/Contents/Developer/Toolchains/OSX$(sw_vers -productVersion | cut -c-4).xctoolchain/usr/bin'"

which outputs
‘/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain’ -> ‘XcodeDefault.xctoolchain’

Now it will work:
ebuild usr/portage/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild install
ebuild usr/portage/www-apache/mod_fcgid/mod_fcgid-2.3.9-r1.ebuild qmerge
Comment 5 iloveosxzfs 2014-08-06 15:46:32 UTC
Created attachment 382394 [details]
second build log
Comment 6 Fabian Groffen gentoo-dev 2014-08-06 15:47:01 UTC
I'm guessing get_libname should be used here
Comment 7 Fabian Groffen gentoo-dev 2014-08-06 16:01:24 UTC
apache-modules.eclass:

# Internal function to construct the default ${APACHE2_MOD_FILE} if required.
apache_mod_file() {
    debug-print-function $FUNCNAME $*

    local MOD_FILE="${APACHE2_MOD_FILE:-$(apache_cd_dir)/.libs/${PN}.so}"

    debug-print $FUNCNAME "MOD_FILE=${MOD_FILE}"
    echo "${MOD_FILE}"
}

that needs either get_libname or get_modname.

Can you list the contents of /Users/joe/gentoo/var/tmp/portage/www-apache/mod_fcgid-2.3.9-r1/work/mod_fcgid-2.3.9/.libs ?
Comment 8 iloveosxzfs 2014-08-06 16:12:49 UTC
Without the workaround:
joe@Josephs-MacBook-Pro ~ $ ls -1 /Users/joe/gentoo/var/tmp/portage/www-apache/mod_fcgid-2.3.9-r1/work/mod_fcgid-2.3.9/.libs/
fcgid_bridge.o
fcgid_bucket.o
fcgid_conf.o
fcgid_filter.o
fcgid_mutex_unix.o
fcgid_pm_main.o
fcgid_pm_unix.o
fcgid_proc_unix.o
fcgid_proctbl_unix.o
fcgid_protocol.o
fcgid_spawn_ctl.o
mod_fcgid.bundle
mod_fcgid.la
mod_fcgid.lai
mod_fcgid.o


With the workaround:
joe@Josephs-MacBook-Pro ~/gentoo $ ls -1 /Users/joe/gentoo/var/tmp/portage/www-apache/mod_fcgid-2.3.9-r1/work/mod_fcgid-2.3.9/.libs/
fcgid_bridge.o
fcgid_bucket.o
fcgid_conf.o
fcgid_filter.o
fcgid_mutex_unix.o
fcgid_pm_main.o
fcgid_pm_unix.o
fcgid_proc_unix.o
fcgid_proctbl_unix.o
fcgid_protocol.o
fcgid_spawn_ctl.o
mod_fcgid.a
mod_fcgid.la
mod_fcgid.lai
mod_fcgid.o
mod_fcgid.so
mod_fcgid.so.dSYM
Comment 9 Fabian Groffen gentoo-dev 2014-08-06 16:15:41 UTC
we'll need get_modname
Comment 10 Fabian Groffen gentoo-dev 2021-01-06 20:18:21 UTC
the .bundle file is what you were looking for.  Not persuing a fix, due to the old age of this bug.