Thread: [Flex-help] flex soname change
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Rich B. <ric...@or...> - 2016-05-19 19:15:31
|
Hi, I'm in the process of updating the version of flex we have in Solaris to 2.6.1 and noticed that the library SONAME is now libfl.so.2 (was libfl.so.1 in the version we've currently got). I've looked through the NEWS file but was unable to determine why it was bumped. Are the two versions binary / ABI compatible? In other words, for binary compatibility can I provide a sym-link from libfl.so.1 to libfl.so.2 (really libfl.so.2.0.)? Thanks. |
From: Will E. <wes...@gm...> - 2016-05-19 19:19:40
|
Absolutely. The change was made when changing how the libraries are built. libtool recommended some settings and just to be clear that things worked differently on the build end, I set the version to 2:0. On Thursday, 19 May 2016, 12:15 pm -0700, Rich Burridge <ric...@or...> wrote: > > Hi, > > I'm in the process of updating the version of flex we have in Solaris > to 2.6.1 and noticed that the library SONAME is now libfl.so.2 > (was libfl.so.1 in the version we've currently got). > > I've looked through the NEWS file but was unable to determine why it > was bumped. Are the two versions binary / ABI compatible? In other > words, for binary compatibility can I provide a sym-link from libfl.so.1 > to libfl.so.2 (really libfl.so.2.0.)? > > Thanks. > > > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |
From: Rich B. <ric...@or...> - 2016-05-19 19:34:27
|
On 05/19/2016 12:19 PM, Will Estes wrote: > Absolutely. The change was made when changing how the libraries are built. libtool recommended some settings and just to be clear that things worked differently on the build end, I set the version to 2:0. Thanks. Then until we are sure we've migrated all our flex consumers over to the new version, I'll add in a sym-link from libfl.so.1 to libfl.so.2.0.0 |
From: Rich B. <ric...@or...> - 2016-05-20 15:02:14
|
Hi, In trying to get flex 2.6.1 working in the build environment we use for FOSS components in Solaris, I encountered three problems which I was easily able to patch around. Please consider these changes for a future version of flex. 1/ In flex-2.6.1/src/Makefile.am there is a rule: stage1scan.l: scan.l cp $(srcdir)/scan.l $(srcdir)/stage1scan.l For Solaris, we don't build things directly in the original source directories, but use a separate build directory. So we need to apply the following patch: --- flex-2.6.1/src/Makefile.am.orig 2016-05-19 06:21:16.631609293 -0700 +++ flex-2.6.1/src/Makefile.am 2016-05-19 14:19:29.394717203 -0700 @@ -87,7 +87,7 @@ mv skel.c.tmp $(srcdir)/skel.c stage1scan.l: scan.l - cp $(srcdir)/scan.l $(srcdir)/stage1scan.l + cp $(srcdir)/scan.l $(top_builddir)/src/stage1scan.l stage1scan.c: stage1scan.l stage1flex$(EXEEXT) $(top_builddir)/src/stage1flex$(EXEEXT) -o $@ $< 2/ Similarly, in flex-2.6.1/doc/Makefile.am we need to run help2man on a flex file that's been created in the build directory not the source directory, so we need to apply this patch: --- flex-2.6.1/doc/Makefile.am.orig 2016-05-19 06:45:26.670565152 -0700 +++ flex-2.6.1/doc/Makefile.am 2016-05-19 06:45:45.734263762 -0700 @@ -26,5 +26,5 @@ for i in $(dist_man_MANS) ; do \ $(help2man) --name='$(PACKAGE_NAME)' \ --section=`echo $$i | sed -e 's/.*\.\([^.]*\)$$/\1/'` \ - $(top_srcdir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \ + $(top_builddir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \ done 3/ The third one is a Solaris specific problem. In /usr/bin, the Solaris version of m4 doesn't understand the -P command line option, so fails when it's part of the chain in flex. We have the GNU m4 binary under /usr/gnu/bin. We can't rely on the M4 environment variable always being set, or that /usr/gnu/bin will be found in the PATH environment variable before /usr/bin, so the existing logic in flex-2.6.1/src/main.c to find m4 doesn't work correctly on Solaris. I've fixed this by using the following patch: --- flex-2.6.1/src/main.c.orig 2016-05-19 14:36:18.569346881 -0700 +++ flex-2.6.1/src/main.c 2016-05-20 07:59:04.169569771 -0700 @@ -348,6 +348,7 @@ /* Setup the filter chain. */ output_chain = filter_create_int(NULL, filter_tee_header, headerfilename); +#ifndef __sun if ( !(m4 = getenv("M4"))) { char *slash; m4 = M4; @@ -389,6 +390,9 @@ } } filter_create_ext(output_chain, m4, "-P", 0); +#else + filter_create_ext(output_chain, "/usr/gnu/bin/m4", "-P", 0); +#endif filter_create_int(output_chain, filter_fix_linedirs, NULL); /* For debugging, only run the requested number of filters. */ Thanks. |
From: Rich B. <ric...@or...> - 2016-05-20 16:14:30
|
On 05/20/2016 08:02 AM, Rich Burridge wrote: > ... > 3/ The third one is a Solaris specific problem. In /usr/bin, the > Solaris version > of m4 doesn't understand the -P command line option, so fails when > it's > part of the chain in flex. We have the GNU m4 binary under > /usr/gnu/bin. > We can't rely on the M4 environment variable always being set, or that > /usr/gnu/bin will be found in the PATH environment variable before > /usr/bin, > so the existing logic in flex-2.6.1/src/main.c to find m4 doesn't > work correctly > on Solaris. I've fixed this by using the following patch: > > --- flex-2.6.1/src/main.c.orig 2016-05-19 14:36:18.569346881 -0700 > +++ flex-2.6.1/src/main.c 2016-05-20 07:59:04.169569771 -0700 > @@ -348,6 +348,7 @@ > > /* Setup the filter chain. */ > output_chain = filter_create_int(NULL, filter_tee_header, > headerfilename); > +#ifndef __sun > if ( !(m4 = getenv("M4"))) { > char *slash; > m4 = M4; > @@ -389,6 +390,9 @@ > } > } > filter_create_ext(output_chain, m4, "-P", 0); > +#else > + filter_create_ext(output_chain, "/usr/gnu/bin/m4", "-P", 0); > +#endif > filter_create_int(output_chain, filter_fix_linedirs, NULL); > > /* For debugging, only run the requested number of filters. */ To reply to my own post. It was pointed out to me that a better solution here would be for the flex configure script to provide a --with-m4 option, and that that was passed done and used in .../src/main.c Thanks. > > > > Thanks. > |
From: Will E. <wes...@gm...> - 2016-05-20 16:47:02
|
A couple thoughts: Yes, configure tries to find m4. There should be a way to specify it though, and whatever the result of "all that" is, that's what main.c should use. Probably by setting a value in config.h, now that I think about it. Some of this is done in the git tree at https://github.com/westes/flex/, post 2.6.1. If you submit patches against that -- particularly if you submit a pull request -- that makes the paperwork go a bit easier. I've got your submitted changes in my queue to review. On Friday, 20 May 2016, 9:14 am -0700, Rich Burridge <ric...@or...> wrote: > On 05/20/2016 08:02 AM, Rich Burridge wrote: > > ... > > 3/ The third one is a Solaris specific problem. In /usr/bin, the > > Solaris version > > of m4 doesn't understand the -P command line option, so fails when > > it's > > part of the chain in flex. We have the GNU m4 binary under > > /usr/gnu/bin. > > We can't rely on the M4 environment variable always being set, or that > > /usr/gnu/bin will be found in the PATH environment variable before > > /usr/bin, > > so the existing logic in flex-2.6.1/src/main.c to find m4 doesn't > > work correctly > > on Solaris. I've fixed this by using the following patch: > > > > --- flex-2.6.1/src/main.c.orig 2016-05-19 14:36:18.569346881 -0700 > > +++ flex-2.6.1/src/main.c 2016-05-20 07:59:04.169569771 -0700 > > @@ -348,6 +348,7 @@ > > > > /* Setup the filter chain. */ > > output_chain = filter_create_int(NULL, filter_tee_header, > > headerfilename); > > +#ifndef __sun > > if ( !(m4 = getenv("M4"))) { > > char *slash; > > m4 = M4; > > @@ -389,6 +390,9 @@ > > } > > } > > filter_create_ext(output_chain, m4, "-P", 0); > > +#else > > + filter_create_ext(output_chain, "/usr/gnu/bin/m4", "-P", 0); > > +#endif > > filter_create_int(output_chain, filter_fix_linedirs, NULL); > > > > /* For debugging, only run the requested number of filters. */ > > To reply to my own post. > > It was pointed out to me that a better solution here would be for > the flex configure script to provide a --with-m4 option, and that > that was passed done and used in .../src/main.c > > Thanks. > > > > > > > > > Thanks. > > > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes wes...@gm... |
From: Will E. <wes...@gm...> - 2016-05-20 22:12:40
|
The bootstrapping of flex was reworked after 2.6.1 was released. I -think- it's immune to the vpath build that you do. If you can verify that against the current git tree, let me know the results. Ditto the building of the man page. As for finding m4, the solution needs to be more general. While what you do works for people who want to use the stock setup on Solaris, I can easily see other situations where it doesn't do enough. I'll open an issue to describe the problem. What should happen is that configure should have an option that accepts a path to a suitable m4 binary. If that option is passed, then configure sets a variable that gets put into config.h which main.c reads. If that option is not passed, then configure should try to find a suitable m4 and set the symbol as previously. The M4 environment variable is handy for certain situations that might arise as well. Thanks for your report and interest in flex. On Friday, 20 May 2016, 8:02 am -0700, Rich Burridge <ric...@or...> wrote: > Hi, > > In trying to get flex 2.6.1 working in the build environment we > use for FOSS components in Solaris, I encountered three problems > which I was easily able to patch around. Please consider these > changes for a future version of flex. > > 1/ In flex-2.6.1/src/Makefile.am there is a rule: > > stage1scan.l: scan.l > cp $(srcdir)/scan.l $(srcdir)/stage1scan.l > > For Solaris, we don't build things directly in the original source > directories, but use a separate build directory. So we need to apply > the following patch: > > --- flex-2.6.1/src/Makefile.am.orig 2016-05-19 06:21:16.631609293 -0700 > +++ flex-2.6.1/src/Makefile.am 2016-05-19 14:19:29.394717203 -0700 > @@ -87,7 +87,7 @@ > mv skel.c.tmp $(srcdir)/skel.c > > stage1scan.l: scan.l > - cp $(srcdir)/scan.l $(srcdir)/stage1scan.l > + cp $(srcdir)/scan.l $(top_builddir)/src/stage1scan.l > > stage1scan.c: stage1scan.l stage1flex$(EXEEXT) > $(top_builddir)/src/stage1flex$(EXEEXT) -o $@ $< > > 2/ Similarly, in flex-2.6.1/doc/Makefile.am we need to run help2man on > a flex file that's been created in the build directory not the source > directory, so we need to apply this patch: > > --- flex-2.6.1/doc/Makefile.am.orig 2016-05-19 06:45:26.670565152 -0700 > +++ flex-2.6.1/doc/Makefile.am 2016-05-19 06:45:45.734263762 -0700 > @@ -26,5 +26,5 @@ > for i in $(dist_man_MANS) ; do \ > $(help2man) --name='$(PACKAGE_NAME)' \ > --section=`echo $$i | sed -e 's/.*\.\([^.]*\)$$/\1/'` \ > - $(top_srcdir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \ > + $(top_builddir)/src/flex$(EXEEXT) > $$i || rm -f $$i ; \ > done > > 3/ The third one is a Solaris specific problem. In /usr/bin, the Solaris > version > of m4 doesn't understand the -P command line option, so fails when it's > part of the chain in flex. We have the GNU m4 binary under /usr/gnu/bin. > We can't rely on the M4 environment variable always being set, or that > /usr/gnu/bin will be found in the PATH environment variable before > /usr/bin, > so the existing logic in flex-2.6.1/src/main.c to find m4 doesn't > work correctly > on Solaris. I've fixed this by using the following patch: > > --- flex-2.6.1/src/main.c.orig 2016-05-19 14:36:18.569346881 -0700 > +++ flex-2.6.1/src/main.c 2016-05-20 07:59:04.169569771 -0700 > @@ -348,6 +348,7 @@ > > /* Setup the filter chain. */ > output_chain = filter_create_int(NULL, filter_tee_header, > headerfilename); > +#ifndef __sun > if ( !(m4 = getenv("M4"))) { > char *slash; > m4 = M4; > @@ -389,6 +390,9 @@ > } > } > filter_create_ext(output_chain, m4, "-P", 0); > +#else > + filter_create_ext(output_chain, "/usr/gnu/bin/m4", "-P", 0); > +#endif > filter_create_int(output_chain, filter_fix_linedirs, NULL); > > /* For debugging, only run the requested number of filters. */ > > > > Thanks. > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |
From: Rich B. <ric...@or...> - 2016-05-22 14:44:09
|
On 05/20/16 03:12 PM, Will Estes wrote: > The bootstrapping of flex was reworked after 2.6.1 was released. I -think- it's immune to the vpath build that you do. If you can verify that against the current git tree, let me know the results. Ditto the building of the man page. Confirmed. Both are now fine. > > As for finding m4, the solution needs to be more general. While what you do works for people who want to use the stock setup on Solaris, I can easily see other situations where it doesn't do enough. Agreed. > > I'll open an issue to describe the problem. > > What should happen is that configure should have an option that accepts a path to a suitable m4 binary. If that option is passed, then configure sets a variable that gets put into config.h which main.c reads. If that option is not passed, then configure should try to find a suitable m4 and set the symbol as previously. The M4 environment variable is handy for certain situations that might arise as well. Sounds good. > > Thanks for your report and interest in flex. You're welcome. And thank you for your quick response. |
From: Will E. <wes...@gm...> - 2016-05-22 15:48:56
|
Glad the two changes that are in the post-2.6.1 tree are helpful. I have plans to put out a 2.6.2 in the near future. It's not scheduled yet, but "in the next couple weeks" seems the most likely time frame. On Sunday, 22 May 2016, 7:48 am -0700, Rich Burridge <ric...@or...> wrote: > On 05/20/16 03:12 PM, Will Estes wrote: > > The bootstrapping of flex was reworked after 2.6.1 was released. I -think- it's immune to the vpath build that you do. If you can verify that against the current git tree, let me know the results. Ditto the building of the man page. > > Confirmed. Both are now fine. > > > > > As for finding m4, the solution needs to be more general. While what you do works for people who want to use the stock setup on Solaris, I can easily see other situations where it doesn't do enough. > > Agreed. > > > > > I'll open an issue to describe the problem. > > > > What should happen is that configure should have an option that accepts a path to a suitable m4 binary. If that option is passed, then configure sets a variable that gets put into config.h which main.c reads. If that option is not passed, then configure should try to find a suitable m4 and set the symbol as previously. The M4 environment variable is handy for certain situations that might arise as well. > > Sounds good. > > > > > Thanks for your report and interest in flex. > > You're welcome. And thank you for your quick response. > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes wes...@gm... |
From: Dennis C. <dc...@bl...> - 2016-05-22 19:57:03
|
> >> >> As for finding m4, the solution needs to be more general. While what you do works for people who want to use the stock setup on Solaris, I can easily see other situations where it doesn't do enough. > Does env var M4=/usr/local/bin/m4 not work ? dc |
From: Dennis C. <dc...@bl...> - 2016-05-21 00:27:39
|
On 05/19/2016 03:19 PM, Will Estes wrote: > Absolutely. The change was made when changing how the libraries are built. libtool recommended some settings and just to be clear that things worked differently on the build end, I set the version to 2:0. > yikes .. so in the ELF header of any downstream binary that needs the previous version we need to either create a hack symlink or re-compile. Okay .. maybe a re-compile is a better way to go anyways. Dennis |
From: Will E. <wes...@gm...> - 2016-05-21 00:44:44
|
Yes. Recompile is best, although there's hardly anything inside libfl, so compatibility at that level isn't an issue. On Friday, 20 May 2016, 8:15 pm -0400, Dennis Clarke <dc...@bl...> wrote: > On 05/19/2016 03:19 PM, Will Estes wrote: > >Absolutely. The change was made when changing how the libraries are built. libtool recommended some settings and just to be clear that things worked differently on the build end, I set the version to 2:0. > > > > > yikes .. so in the ELF header of any downstream binary that needs the > previous version we need to either create a hack symlink or re-compile. > > Okay .. maybe a re-compile is a better way to go anyways. > > Dennis > -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |
From: Dennis C. <dc...@bl...> - 2016-05-21 06:54:24
|
On 05/20/2016 08:44 PM, Will Estes wrote: > Yes. Recompile is best, although there's hardly anything inside libfl, so compatibility at that level isn't an issue. > When a "soname" changes the best thing is just to recompile the dependants. Also, by the way, Hi! long time since I crawled over flex and I think a new package is needed anyways. Good the see the same names in the same places doing what we do :-) Dennis |
From: Will E. <wes...@gm...> - 2016-05-21 12:36:35
|
Hi! Yes, your continued work on blastwave is an inspiration. On Saturday, 21 May 2016, 2:54 am -0400, Dennis Clarke <dc...@bl...> wrote: > On 05/20/2016 08:44 PM, Will Estes wrote: > > Yes. Recompile is best, although there's hardly anything inside libfl, so compatibility at that level isn't an issue. > > > > > When a "soname" changes the best thing is just to recompile the > dependants. Also, by the way, Hi! long time since I crawled over flex > and I think a new package is needed anyways. Good the see the same > names in the same places doing what we do :-) > > Dennis > > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > -- > Flex-help mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-help -- Will Estes Flex Project Maintainer wes...@gm... https://github.com/westes/flex |
From: Dennis C. <dc...@bl...> - 2016-05-21 17:35:40
|
On 05/21/2016 08:36 AM, Will Estes wrote: > Hi! Yes, your continued work on blastwave is an inspiration. > I have been running a full software stack in production within a financial services company for four years and the whole stack from top to bottom is full 64-bit and has Apache 2.4.20 with top of the line PHP and a bucket of other goodies. The big snag has been MySQL lately. However I am working that out with kitware and it will be off the ground for a release of a commercial grade stack in "real soon now" timeline. Also .. you should see the new Oracle SPARC gear .. it's amazing. Dennis |