Skip to contentSkip to conversation

checkpolicy: remove -lfl from LDLIBS patch.

PATCH In review Adam Duskett 3 participants 5 messages May 20, 2017 – May 23, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpolicy: remove -lfl from LDLIBS patch.

from: https://patchwork.kernel.org/patch/9450549/
When building checkpolicy/test, the linker reports the following error:

cc dispol.o -lfl /usr/src/selinux/DESTDIR/usr/lib/libsepol.a
-L/usr/src/selinux/DESTDIR/usr/lib -o dispol

/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../lib/libfl.so:
undefined reference to `yylex'

collect2: error: ld returned 1 exit status

According to flex documentation
(https://github.com/westes/flex/blob/master/doc/flex.texi), -lfl is used to provide an implementation for yywrap(). However every flex file now uses "%option noyywrap", which makes -lfl no longer mandatory. Remove this option from checkpolicy Makefiles.

The patch is slightly modified to remove the /checkpolicy path.

---
 .../0001-checkpolicy-remove-lfl-from-LDLIBS.patch  | 58 ++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 package/checkpolicy/0001-checkpolicy-remove-lfl-from-LDLIBS.patch
package/checkpolicy/0001-checkpolicy-remove-lfl-from-LDLIBS.patch new file +58 -0
new file mode 100644
index 0000000..c0b6de8
@@ -0,0 +1,58 @@
+From 4d215a1e8111e14f6074f7abe2559800b6f4838c Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Sat, 20 May 2017 11:01:08 -0400
+Subject: [PATCH] checkpolicy: remove -lfl from LDLIBSlogin
+
+When building checkpolicy/test, the linker reports the following error:
+cc   dispol.o  -lfl /usr/src/selinux/DESTDIR/usr/lib/libsepol.a
+-L/usr/src/selinux/DESTDIR/usr/lib -o dispol
+/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../lib/libfl.so:
+undefined reference to `yylex'
+collect2: error: ld returned 1 exit status
+
+According to flex documentation
+(https://github.com/westes/flex/blob/master/doc/flex.texi), -lfl is used
+to provide an implementation for yywrap(). However every flex file now
+uses "%option noyywrap", which makes -lfl no longer mandatory. Remove
+this option from checkpolicy Makefiles.
+
+
+Backported from:
+https://patchwork.kernel.org/patch/9450549/
+
+Original author: Nicolas Iooss <[email protected]>
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ Makefile      | 2 +-
+ test/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 53a3074..875cf00 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@ CHECKOBJS = y.tab.o lex.yy.o queue.o module_compiler.o parse_util.o \
+ CHECKPOLOBJS = $(CHECKOBJS) checkpolicy.o
+ CHECKMODOBJS = $(CHECKOBJS) checkmodule.o
+ 
+-LDLIBS=$(LIBDIR)/libsepol.a -lfl
++LDLIBS=$(LIBDIR)/libsepol.a
+ 
+ GENERATED=lex.yy.c y.tab.c y.tab.h
+ 
+diff --git a/test/Makefile b/test/Makefile
+index c2367e1..e7bd717 100644
+--- a/test/Makefile
++++ b/test/Makefile
+@@ -9,7 +9,7 @@ INCLUDEDIR ?= $(PREFIX)/include
+ CFLAGS ?= -g -Wall -W -Werror -O2 -pipe
+ override CFLAGS += -I$(INCLUDEDIR)
+ 
+-LDLIBS=-lfl $(LIBDIR)/libsepol.a -L$(LIBDIR)
++LDLIBS=$(LIBDIR)/libsepol.a -L$(LIBDIR)
+ 
+ all: dispol dismod
+ 
+-- 
+2.9.3
+
Signature · 1 line
2.9.3
#1 lore raw

[Buildroot] A qemu and startx with mouse ?

Hello Everyone,

How can I use mouse on qemu and startx ?
I can run twm and xterm but mouse and keyboard in qemu is off ?

Here are some captures :

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170521/10ccceea/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dpianjcmiebpeoge.png
Type: image/png
Size: 134231 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170521/10ccceea/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kgalipafngibiaek.png
Type: image/png
Size: 43120 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170521/10ccceea/attachment-0003.png>

#2 lore raw

[Buildroot] A qemu and startx with mouse ?

Hello,

Quoted 2 lines · Riko Ho

How can I use mouse on qemu and startx ?
I can run twm and xterm but mouse and keyboard in qemu is off ?

Please stop replying to unrelated e-mails when starting a new discussion, you break e-mail threads by doing so.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

[Buildroot] A qemu and startx with mouse ?

Like this ?

Ok

Quoted 12 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Riko Ho

How can I use mouse on qemu and startx ?
I can run twm and xterm but mouse and keyboard in qemu is off ?

Please stop replying to unrelated e-mails when starting a new discussion, you break e-mail threads by doing so.

Thanks,

Thomas

Signature · 13 lines
*

/*******/
Sent by Ubuntu LTS 16.04,
??,
Regards,
Riko Ho
/*******/

*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170521/db4ed852/attachment.html>
#4 lore raw

PATCH 1/1 checkpolicy: remove -lfl from LDLIBS patch.

In reply to Adam Duskett

Hello,

Quoted 1 line · Adam Duskett

from: https://patchwork.kernel.org/patch/9450549/

Please do not use from: <something> at the beginning of the commit log, because Git believes this is the "Author".

Besides that: applied on next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com