Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 879635 - ERROR: dev-util/ragel-7.0.4::gentoo_prefix failed (compile phase)
Summary: ERROR: dev-util/ragel-7.0.4::gentoo_prefix failed (compile phase)
Status: RESOLVED DUPLICATE of bug 832391
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-04 22:07 UTC by Askar Bektassov
Modified: 2022-12-12 19:33 UTC (History)
2 users (show)

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


Attachments
addresses the lack of .la files on macOS (ragel-7.0.4-lafiles.patch,1.14 KB, patch)
2022-11-07 23:08 UTC, Askar Bektassov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Askar Bektassov 2022-11-04 22:07:30 UTC
Apparently, Makefile lacks a rule to build a necessary library

Reproducible: Always

Steps to Reproduce:
emerge ragel
Actual Results:  
make[3]: Entering directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/ragel-7.0.4/work/ragel-7.0.4/src'

...

arm64-apple-darwin21-g++ -DHAVE_CONFIG_H -I.  -I../aapl -I../colm/include -I/Users/askarbektassov/Gentoo/usr/include/aapl -I/Users/askarbektassov/Gentoo/usr/include   -O2 -pipe -c -o ragel-rlreduce.o `test -f 'rlreduce.cc' || echo './'`rlreduce.cc
make[3]: *** No rule to make target '/Users/askarbektassov/Gentoo/usr/lib/libfsm.la', needed by 'ragel'.  Stop.
make[3]: *** Waiting for unfinished jobs....

Expected Results:  
make[3]: Entering directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/ragel-7.0.4/work/ragel-7.0.4/src'
arm64-apple-darwin21-g++ -DHAVE_CONFIG_H -I.  -I../aapl -I../colm/include -I/Users/askarbektassov/Gentoo/usr/include/aapl -I/Users/askarbektassov/Gentoo/usr/include   -O2 -pipe -c -o ragel-main.o `test -f 'main.cc' || echo './'`main.cc
arm64-apple-darwin21-gcc -DHAVE_CONFIG_H -I.  -I../aapl -I../colm/include -I/Users/askarbektassov/Gentoo/usr/include/aapl -I/Users/askarbektassov/Gentoo/usr/include   -O2 -pipe -c -o ragel-parse.o `test -f 'parse.c' || echo './'`parse.c
arm64-apple-darwin21-g++ -DHAVE_CONFIG_H -I.  -I../aapl -I../colm/include -I/Users/askarbektassov/Gentoo/usr/include/aapl -I/Users/askarbektassov/Gentoo/usr/include   -O2 -pipe -c -o ragel-rlreduce.o `test -f 'rlreduce.cc' || echo './'`rlreduce.cc
make[3]: *** No rule to make target '/Users/askarbektassov/Gentoo/usr/lib/libfsm.la', needed by 'ragel'.  Stop.
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/ragel-7.0.4/work/ragel-7.0.4/src'
make[2]: *** [Makefile:852: all-recursive] Error 1

It would seem that ragel was compiled successfully in August, when I still used gcc 12.1 and CLT for Xcode 13.4, which makes me wonder how come it does not compile now.

askarbektassov@Askars-MBP ~ $ qlop ragel
2022-08-06T10:22:59 >>> dev-util/ragel: 1′13″
Comment 1 Askar Bektassov 2022-11-04 22:09:10 UTC
I hate I cannot edit my posts :))) made a mess with descriptions, and now it all garbled
Comment 2 Askar Bektassov 2022-11-05 11:30:02 UTC
Just noticed that elibtoolize is failing to apply one of the patches.

>>> Emerging (1 of 1) dev-util/ragel-7.0.4::gentoo_prefix

...

 * Running elibtoolize in: ragel-7.0.4/
 *   Applying portage/1.2.0 patch ...
 *   Applying sed/1.5.6 patch ...
 *   Applying as-needed/2.4.3 patch ...
 *   Darwin patch set 'darwin-conf' failed to apply!
>>> Source prepared.
Comment 3 Fabian Groffen gentoo-dev 2022-11-06 21:03:15 UTC
I see this too, libsmf should come from colm, but I wonder by it depends on libsmf.la
Comment 4 Askar Bektassov 2022-11-06 23:24:38 UTC
Apparently, there was a problem upstream...

https://github.com/adrian-thurston/ragel/issues/78

In any case, I noticed that libfsm.la and libcolm.la should have been installed by colm. However, starting from 0.14.7, it does not install them. It only installs their dylib equivalents. When I emerge dev-util/colm-0.14.7-r2, I noticed that at least in case of libcolm.la it clearly says that it has not been installed.

... first this ...

make[3]: Entering directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/libfsm'
 /Users/askarbektassov/Gentoo/usr/bin/mkdir -p '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/include/libfsm/'
 /Users/askarbektassov/Gentoo/usr/bin/mkdir -p '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib'
 /Users/askarbektassov/Gentoo/usr/bin/bash ../../libtool   --mode=install /Users/askarbektassov/Gentoo/usr/bin/install -c   libfsm.la '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib'
 /Users/askarbektassov/Gentoo/usr/bin/install -c -m 644 action.h fsmgraph.h common.h gendata.h redfsm.h dot.h asm.h ragel.h '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/include/libfsm/'
libtool: install: /Users/askarbektassov/Gentoo/usr/bin/install -c .libs/libfsm-0.14.7.dylib /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib/libfsm-0.14.7.dylib
libtool: install: (cd /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib && { ln -s -f libfsm-0.14.7.dylib libfsm.dylib || { rm -f libfsm.dylib && ln -s libfsm-0.14.7.dylib libfsm.dylib; }; })
libtool: install: /Users/askarbektassov/Gentoo/usr/bin/install -c .libs/libfsm.lai /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib/libfsm.la
libtool: warning: remember to run 'libtool --finish /Users/askarbektassov/Gentoo/usr/lib'
make[3]: Leaving directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/libfsm'

... and then this ...

make[3]: Entering directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src'
 /Users/askarbektassov/Gentoo/usr/bin/mkdir -p '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/bin'
 /Users/askarbektassov/Gentoo/usr/bin/mkdir -p '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib'
 /Users/askarbektassov/Gentoo/usr/bin/bash ../libtool   --mode=install /Users/askarbektassov/Gentoo/usr/bin/install -c   libcolm.la '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib'
 /Users/askarbektassov/Gentoo/usr/bin/mkdir -p '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/include/colm'
 /Users/askarbektassov/Gentoo/usr/bin/install -c colm-wrap '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/bin'
 /Users/askarbektassov/Gentoo/usr/bin/install -c -m 644 config.h bytecode.h defs.h debug.h pool.h input.h pdarun.h map.h type.h tree.h struct.h program.h colm.h internal.h colmex.h '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/include/colm'
libtool: install: /Users/askarbektassov/Gentoo/usr/bin/install -c .libs/libcolm-0.14.7.dylib /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib/libcolm-0.14.7.dylib
libtool: install: (cd /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib && { ln -s -f libcolm-0.14.7.dylib libcolm.dylib || { rm -f libcolm.dylib && ln -s libcolm-0.14.7.dylib libcolm.dylib; }; })
libtool: install: /Users/askarbektassov/Gentoo/usr/bin/install -c .libs/libcolm.lai /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/lib/libcolm.la
libtool: warning: remember to run 'libtool --finish /Users/askarbektassov/Gentoo/usr/lib'
 /Users/askarbektassov/Gentoo/usr/bin/mkdir -p '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/bin'
  /Users/askarbektassov/Gentoo/usr/bin/bash ../libtool   --mode=install /Users/askarbektassov/Gentoo/usr/bin/install -c colm '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/bin'
libtool: warning: '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src/libcolm.la' has not been installed in '/Users/askarbektassov/Gentoo/usr/lib'
libtool: install: /Users/askarbektassov/Gentoo/usr/bin/install -c .libs/colm /Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/image/Users/askarbektassov/Gentoo/usr/bin/colm
make[3]: Leaving directory '/Users/askarbektassov/Gentoo/var/tmp/portage/dev-util/colm-0.14.7-r2/work/colm-0.14.7/src'
Comment 5 Fabian Groffen gentoo-dev 2022-11-07 06:49:31 UTC
can try the lafiles fix from
https://github.com/macports/macports-ports/commit/cd2c9d0da801a359f456efc50a3aeeaf6dd86596
Comment 6 Askar Bektassov 2022-11-07 23:08:13 UTC
Created attachment 828547 [details, diff]
addresses the lack of .la files on macOS

dev-util/colm-0.14.7-r2 installs dylib files, in place of libcolm.la and libfsm.la. For this reason, ragel is fails during compilation. Replacing the above with generic -lcolm and -lfsm should fix the problem.
Comment 7 Askar Bektassov 2022-11-07 23:12:28 UTC
(In reply to Fabian Groffen from comment #5)
> can try the lafiles fix from
> https://github.com/macports/macports-ports/commit/
> cd2c9d0da801a359f456efc50a3aeeaf6dd86596

Yep, their patch seems to work, except that instead of

AC_CHECK_LIB(
	[fsm],
	[LIBFSM_LA=-lfsm],
	[AC_ERROR([libfsm is required to build ragel])]
)

I had to use the following, otherwise it was not metting -lfsm in some deeper Makefiles

AC_CHECK_LIB(
	[fsm],
	main,
	[LIBFSM_LA=-lfsm],
	[AC_ERROR([libfsm is required to build ragel])]
)
Comment 8 Fabian Groffen gentoo-dev 2022-11-08 07:22:20 UTC
@lu_zero: ok to apply this patch for macOS?
Comment 9 Pacho Ramos gentoo-dev 2022-12-09 07:55:08 UTC
i see the same error on amd64, not only prefix :/
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-09 15:14:11 UTC
(In reply to Fabian Groffen from comment #8)
> @lu_zero: ok to apply this patch for macOS?

go for it
Comment 11 Fabian Groffen gentoo-dev 2022-12-12 19:33:46 UTC
this was actually fixed by e155af013558a4a3164fb9867ef1d65d34c6ed3a

*** This bug has been marked as a duplicate of bug 832391 ***