[Ocfs2-test-devel] [PATCH 48/59] ocfs2-test: fix build error

Eric Ren zren at suse.com
Wed Sep 23 01:11:38 PDT 2015


Hi Junxiao,

This patch should be dropped. Because Goldwyn's previous patch
has covered this issue. No need to add libaio explicitly if using
pkg-config:

desktop:~/ocfs2-test # pkg-config --cflags --libs ocfs2
-I/usr/include/et -locfs2 -laio -lo2dlm -ldl -lo2cb -ldl -lcom_err 

Thanks,
Eric

On Wed, Sep 23, 2015 at 02:32:24PM +0800, Eric Ren wrote: 
> Reviewed and conflict fixed by: Eric Ren <zren at sue.com>
> 
> Thanks,
> Eric Ren
> 
> On Mon, Sep 14, 2015 at 10:44:34AM +0800, Junxiao Bi wrote: 
> > libocfs2 depends on libaio, add the reference to libaio where libocfs2
> > exist to fix the following build error.
> > 
> > gcc -O2 -Wall -g  -o inline-data inline-data.o inline-data-utils.o -locfs2
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libocfs2.a(unix_io.o): In function `unix_vec_read_blocks':
> > (.text+0x874): undefined reference to `io_queue_init'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libocfs2.a(unix_io.o): In function `unix_vec_read_blocks':
> > (.text+0x909): undefined reference to `io_submit'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libocfs2.a(unix_io.o): In function `unix_vec_read_blocks':
> > (.text+0x949): undefined reference to `io_queue_release'
> > /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libocfs2.a(unix_io.o): In function `unix_vec_read_blocks':
> > (.text+0x988): undefined reference to `io_getevents'
> > collect2: ld returned 1 exit status
> > 
> > Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
> > ---
> >  programs/inline-data/Makefile             |    8 ++++----
> >  programs/truncate/ocfs2-tools/Makefile    |    2 +-
> >  programs/tunefs-test/remove-slot/Makefile |    2 +-
> >  3 files changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/programs/inline-data/Makefile b/programs/inline-data/Makefile
> > index 4bfd809..268e562 100644
> > --- a/programs/inline-data/Makefile
> > +++ b/programs/inline-data/Makefile
> > @@ -18,10 +18,10 @@ BIN_PROGRAMS = inline-data inline-dirs multi-inline-data multi-inline-dirs
> >  BIN_EXTRA =  single-inline-run.sh multi-inline-run.sh
> >  
> >  inline-data: inline-data.o inline-data-utils.o
> > -	$(LINK) -locfs2
> > +	$(LINK) -locfs2 -laio
> >  
> >  inline-dirs: inline-dirs.o inline-dirs-utils.o
> > -	$(LINK) -locfs2
> > +	$(LINK) -locfs2 -laio
> >  
> >  multi-inline-data.o: multi-inline-data.c
> >  	$(MPICC) -c multi-inline-data.c
> > @@ -30,9 +30,9 @@ multi-inline-dirs.o: multi-inline-dirs.c
> >  	$(MPICC) -c multi-inline-dirs.c
> >  
> >  multi-inline-data: multi-inline-data.o inline-data-utils.o
> > -	$(MPI_LINK) -locfs2
> > +	$(MPI_LINK) -locfs2 -laio
> >  
> >  multi-inline-dirs: multi-inline-dirs.o
> > -	$(MPI_LINK) -locfs2
> > +	$(MPI_LINK) -locfs2 -laio
> >  
> >  include $(TOPDIR)/Postamble.make
> > diff --git a/programs/truncate/ocfs2-tools/Makefile b/programs/truncate/ocfs2-tools/Makefile
> > index 63fa817..902ac16 100644
> > --- a/programs/truncate/ocfs2-tools/Makefile
> > +++ b/programs/truncate/ocfs2-tools/Makefile
> > @@ -16,6 +16,6 @@ BIN_PROGRAMS = test_truncate
> >  BIN_EXTRA = ocfs2_truncate.sh
> >  
> >  test_truncate: $(OBJECTS)
> > -	$(LINK)  -locfs2 -lcom_err
> > +	$(LINK)  -locfs2 -laio -lcom_err
> >  
> >  include $(TOPDIR)/Postamble.make
> > diff --git a/programs/tunefs-test/remove-slot/Makefile b/programs/tunefs-test/remove-slot/Makefile
> > index 97226ea..d47e713 100644
> > --- a/programs/tunefs-test/remove-slot/Makefile
> > +++ b/programs/tunefs-test/remove-slot/Makefile
> > @@ -16,6 +16,6 @@ BIN_PROGRAMS = remove_slot
> >  BIN_EXTRA = remove_slot.sh corrupt_remove_slot.sh
> >  
> >  remove_slot: $(OBJECTS)
> > -	$(LINK)  -locfs2 -lcom_err
> > +	$(LINK)  -locfs2 -laio -lcom_err
> >  
> >  include $(TOPDIR)/Postamble.make
> > -- 
> > 1.7.9.5
> > 
> > 
> > _______________________________________________
> > Ocfs2-test-devel mailing list
> > Ocfs2-test-devel at oss.oracle.com
> > https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
> > 
> 
> _______________________________________________
> Ocfs2-test-devel mailing list
> Ocfs2-test-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-test-devel
> 



More information about the Ocfs2-test-devel mailing list