* more complex example_cmdlib.c ?
@ 2013-11-25 14:28 Oliver Rath
2013-11-25 15:11 ` Zdenek Kabelac
0 siblings, 1 reply; 9+ messages in thread
From: Oliver Rath @ 2013-11-25 14:28 UTC (permalink / raw)
To: lvm-devel
Hi list,
Im looking for examples using lvm in c (or c++) Code. I realized, that
there is a really terse example in lvm/doc/example_cmdlib.c.
Is it possible to include a more complex example for doing the
lvm2-tasks like vgcreate, lvcreate incl. using thinpools, making thin
snaps etc. ?
Btw, this would be useful for the python-example, too.
Tfh!
Oliver
^ permalink raw reply [flat|nested] 9+ messages in thread
* more complex example_cmdlib.c ?
2013-11-25 14:28 more complex example_cmdlib.c ? Oliver Rath
@ 2013-11-25 15:11 ` Zdenek Kabelac
2013-11-25 15:41 ` libcunit not found but installed [was Re: more complex example_cmdlib.c ? ] Oliver Rath
0 siblings, 1 reply; 9+ messages in thread
From: Zdenek Kabelac @ 2013-11-25 15:11 UTC (permalink / raw)
To: lvm-devel
Dne 25.11.2013 15:28, Oliver Rath napsal(a):
> Hi list,
>
> Im looking for examples using lvm in c (or c++) Code. I realized, that
> there is a really terse example in lvm/doc/example_cmdlib.c.
>
> Is it possible to include a more complex example for doing the
> lvm2-tasks like vgcreate, lvcreate incl. using thinpools, making thin
> snaps etc. ?
>
> Btw, this would be useful for the python-example, too.
>
>
Maybe look at test subdir - there are some API tests and
also some python scripts which are trying to exercise some
supported pieces.
NOTE: this API is being seen as experimental - so it's quite away for having
the same usability as a native lvm2 command line.
Zdenek
^ permalink raw reply [flat|nested] 9+ messages in thread
* libcunit not found but installed [was Re: more complex example_cmdlib.c ? ]
2013-11-25 15:11 ` Zdenek Kabelac
@ 2013-11-25 15:41 ` Oliver Rath
2013-11-25 16:16 ` Zdenek Kabelac
0 siblings, 1 reply; 9+ messages in thread
From: Oliver Rath @ 2013-11-25 15:41 UTC (permalink / raw)
To: lvm-devel
Hi Zdenek!
Am 25.11.2013 16:11, schrieb Zdenek Kabelac:
> [..] Maybe look at test subdir - there are some API tests and
> also some python scripts which are trying to exercise some
> supported pieces.
I tried to install lvm with --enable-testing , but the needed cunit
seems not to be found on my ubuntu 12.04.3 System:
lvm2# dpkg-query -l libcunit1
Gew?nscht=Unbekannt/Installieren/R=Entfernen/P=Vollst?ndig L?schen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anh?ngig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
GROSS=schlecht)
||/ Name Version Beschreibung
+++-========================-========================-================================================================
ii libcunit1 2.1-0.dfsg-9 Unit Testing
Library for C
lvm2# dpkg-query -L libcunit1
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libcunit1
/usr/share/doc/libcunit1/changelog.gz
/usr/share/doc/libcunit1/copyright
/usr/share/doc/libcunit1/changelog.Debian.gz
/usr/share/CUnit
/usr/share/CUnit/CUnit-List.dtd
/usr/share/CUnit/CUnit-List.xsl
/usr/share/CUnit/CUnit-Run.dtd
/usr/share/CUnit/CUnit-Run.xsl
/usr/share/CUnit/Memory-Dump.dtd
/usr/share/CUnit/Memory-Dump.xsl
/usr/lib
/usr/lib/libcunit.so.1.0.1
/usr/lib/libcunit.so.1
lvm2# ./configure --with-thin=internal --with-replicators=internal
--enable-udev_sync --enable-udev_rules --enable-python_bindings
--enable-applib --enable-cmdlib --enable-testing
[..]
checking pkg-config is at least version 0.9.0... yes
checking for PKGCONFIGINIT... no
pkg-config initialized
checking for CUNIT... no
configure: error: Package requirements (cunit >= 2.0) were not met:
No package 'cunit' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables CUNIT_CFLAGS
and CUNIT_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
What is going wrong here? TFH!
Regards,
Oliver
^ permalink raw reply [flat|nested] 9+ messages in thread
* libcunit not found but installed [was Re: more complex example_cmdlib.c ? ]
2013-11-25 15:41 ` libcunit not found but installed [was Re: more complex example_cmdlib.c ? ] Oliver Rath
@ 2013-11-25 16:16 ` Zdenek Kabelac
2013-11-25 16:20 ` Zdenek Kabelac
0 siblings, 1 reply; 9+ messages in thread
From: Zdenek Kabelac @ 2013-11-25 16:16 UTC (permalink / raw)
To: lvm-devel
Dne 25.11.2013 16:41, Oliver Rath napsal(a):
> Hi Zdenek!
>
> Am 25.11.2013 16:11, schrieb Zdenek Kabelac:
>> [..] Maybe look at test subdir - there are some API tests and
>> also some python scripts which are trying to exercise some
>> supported pieces.
>
> I tried to install lvm with --enable-testing , but the needed cunit
> seems not to be found on my ubuntu 12.04.3 System:
>
> lvm2# dpkg-query -l libcunit1
> Gew?nscht=Unbekannt/Installieren/R=Entfernen/P=Vollst?ndig L?schen/Halten
> | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
> Halb installiert/Trigger erWartet/Trigger anh?ngig
> |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
> GROSS=schlecht)
> ||/ Name Version Beschreibung
> +++-========================-========================-================================================================
> ii libcunit1 2.1-0.dfsg-9 Unit Testing
> Library for C
>
> lvm2# dpkg-query -L libcunit1
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/libcunit1
> /usr/share/doc/libcunit1/changelog.gz
> /usr/share/doc/libcunit1/copyright
> /usr/share/doc/libcunit1/changelog.Debian.gz
> /usr/share/CUnit
> /usr/share/CUnit/CUnit-List.dtd
> /usr/share/CUnit/CUnit-List.xsl
> /usr/share/CUnit/CUnit-Run.dtd
> /usr/share/CUnit/CUnit-Run.xsl
> /usr/share/CUnit/Memory-Dump.dtd
> /usr/share/CUnit/Memory-Dump.xsl
> /usr/lib
> /usr/lib/libcunit.so.1.0.1
> /usr/lib/libcunit.so.1
>
>
> lvm2# ./configure --with-thin=internal --with-replicators=internal
> --enable-udev_sync --enable-udev_rules --enable-python_bindings
> --enable-applib --enable-cmdlib --enable-testing
>
> [..]
>
> checking pkg-config is at least version 0.9.0... yes
> checking for PKGCONFIGINIT... no
> pkg-config initialized
> checking for CUNIT... no
> configure: error: Package requirements (cunit >= 2.0) were not met:
>
> No package 'cunit' found
>
> Consider adjusting the PKG_CONFIG_PATH environment variable if you
> installed software in a non-standard prefix.
>
> Alternatively, you may set the environment variables CUNIT_CFLAGS
> and CUNIT_LIBS to avoid the need to call pkg-config.
> See the pkg-config man page for more details.
>
>
> What is going wrong here? TFH!
>
>
Google:
https://launchpad.net/ubuntu/+source/cunit
Zdenek
^ permalink raw reply [flat|nested] 9+ messages in thread
* libcunit not found but installed [was Re: more complex example_cmdlib.c ? ]
2013-11-25 16:16 ` Zdenek Kabelac
@ 2013-11-25 16:20 ` Zdenek Kabelac
2013-11-25 16:25 ` Oliver Rath
0 siblings, 1 reply; 9+ messages in thread
From: Zdenek Kabelac @ 2013-11-25 16:20 UTC (permalink / raw)
To: lvm-devel
Dne 25.11.2013 17:16, Zdenek Kabelac napsal(a):
> Dne 25.11.2013 16:41, Oliver Rath napsal(a):
>> Hi Zdenek!
>>
>> Am 25.11.2013 16:11, schrieb Zdenek Kabelac:
>>> [..] Maybe look at test subdir - there are some API tests and
>>> also some python scripts which are trying to exercise some
>>> supported pieces.
>>
>> I tried to install lvm with --enable-testing , but the needed cunit
>> seems not to be found on my ubuntu 12.04.3 System:
>>
>> lvm2# dpkg-query -l libcunit1
>> Gew?nscht=Unbekannt/Installieren/R=Entfernen/P=Vollst?ndig L?schen/Halten
>> | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
>> Halb installiert/Trigger erWartet/Trigger anh?ngig
>> |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
>> GROSS=schlecht)
>> ||/ Name Version Beschreibung
>> +++-========================-========================-================================================================
>>
>> ii libcunit1 2.1-0.dfsg-9 Unit Testing
>> Library for C
>>
>> lvm2# dpkg-query -L libcunit1
>> /.
>> /usr
>> /usr/share
>> /usr/share/doc
>> /usr/share/doc/libcunit1
>> /usr/share/doc/libcunit1/changelog.gz
>> /usr/share/doc/libcunit1/copyright
>> /usr/share/doc/libcunit1/changelog.Debian.gz
>> /usr/share/CUnit
>> /usr/share/CUnit/CUnit-List.dtd
>> /usr/share/CUnit/CUnit-List.xsl
>> /usr/share/CUnit/CUnit-Run.dtd
>> /usr/share/CUnit/CUnit-Run.xsl
>> /usr/share/CUnit/Memory-Dump.dtd
>> /usr/share/CUnit/Memory-Dump.xsl
>> /usr/lib
>> /usr/lib/libcunit.so.1.0.1
>> /usr/lib/libcunit.so.1
>>
>>
>> lvm2# ./configure --with-thin=internal --with-replicators=internal
>> --enable-udev_sync --enable-udev_rules --enable-python_bindings
>> --enable-applib --enable-cmdlib --enable-testing
>>
>> [..]
>>
>> checking pkg-config is at least version 0.9.0... yes
>> checking for PKGCONFIGINIT... no
>> pkg-config initialized
>> checking for CUNIT... no
>> configure: error: Package requirements (cunit >= 2.0) were not met:
>>
>> No package 'cunit' found
>>
>> Consider adjusting the PKG_CONFIG_PATH environment variable if you
>> installed software in a non-standard prefix.
>>
>> Alternatively, you may set the environment variables CUNIT_CFLAGS
>> and CUNIT_LIBS to avoid the need to call pkg-config.
>> See the pkg-config man page for more details.
>>
>>
>> What is going wrong here? TFH!
>>
>>
>
> Google:
>
> https://launchpad.net/ubuntu/+source/cunit
>
You need devel packages for cunit if you want to link it.
Zdenek
^ permalink raw reply [flat|nested] 9+ messages in thread
* libcunit not found but installed [was Re: more complex example_cmdlib.c ? ]
2013-11-25 16:20 ` Zdenek Kabelac
@ 2013-11-25 16:25 ` Oliver Rath
2013-11-25 16:28 ` Zdenek Kabelac
2013-11-25 16:30 ` Zdenek Kabelac
0 siblings, 2 replies; 9+ messages in thread
From: Oliver Rath @ 2013-11-25 16:25 UTC (permalink / raw)
To: lvm-devel
Hi Zdenek!
Am 25.11.2013 17:20, schrieb Zdenek Kabelac:
> Dne 25.11.2013 17:16, Zdenek Kabelac napsal(a):
> [..]
> You need devel packages for cunit if you want to link it.
>
was already installed:
lvm2$ dpkg-query -l libcunit1-dev
Gew?nscht=Unbekannt/Installieren/R=Entfernen/P=Vollst?ndig L?schen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
Halb installiert/Trigger erWartet/Trigger anh?ngig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
GROSS=schlecht)
||/ Name Version Beschreibung
+++-========================-========================-================================================================
ii libcunit1-dev 2.1-0.dfsg-9 Unit Testing
Library for C -- development files
lvm2$ dpkg-query -L libcunit1-dev
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libcunit1-dev
/usr/share/doc/libcunit1-dev/changelog.gz
/usr/share/doc/libcunit1-dev/NEWS.gz
/usr/share/doc/libcunit1-dev/AUTHORS
/usr/share/doc/libcunit1-dev/TODO
/usr/share/doc/libcunit1-dev/README.Debian-source
/usr/share/doc/libcunit1-dev/copyright
/usr/share/doc/libcunit1-dev/changelog.Debian.gz
/usr/share/doc/libcunit1-dev/README.gz
/usr/share/man
/usr/share/man/man3
/usr/share/man/man3/CUnit.3.gz
/usr/include
/usr/include/CUnit
/usr/include/CUnit/CUError.h
/usr/include/CUnit/CUnit.h
/usr/include/CUnit/MyMem.h
/usr/include/CUnit/TestDB.h
/usr/include/CUnit/TestRun.h
/usr/include/CUnit/Util.h
/usr/include/CUnit/Basic.h
/usr/include/CUnit/Console.h
/usr/include/CUnit/Automated.h
/usr/lib
/usr/lib/libcunit.a
/usr/lib/libcunit.la
/usr/lib/libcunit.so
Whats now?
Regards,
Oliver
^ permalink raw reply [flat|nested] 9+ messages in thread
* libcunit not found but installed [was Re: more complex example_cmdlib.c ? ]
2013-11-25 16:25 ` Oliver Rath
@ 2013-11-25 16:28 ` Zdenek Kabelac
2013-11-25 16:30 ` Zdenek Kabelac
1 sibling, 0 replies; 9+ messages in thread
From: Zdenek Kabelac @ 2013-11-25 16:28 UTC (permalink / raw)
To: lvm-devel
Dne 25.11.2013 17:25, Oliver Rath napsal(a):
> Hi Zdenek!
>
> Am 25.11.2013 17:20, schrieb Zdenek Kabelac:
>> Dne 25.11.2013 17:16, Zdenek Kabelac napsal(a):
>> [..]
>> You need devel packages for cunit if you want to link it.
>>
> was already installed:
>
> lvm2$ dpkg-query -l libcunit1-dev
> Gew?nscht=Unbekannt/Installieren/R=Entfernen/P=Vollst?ndig L?schen/Halten
> | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
> Halb installiert/Trigger erWartet/Trigger anh?ngig
> |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
> GROSS=schlecht)
> ||/ Name Version Beschreibung
> +++-========================-========================-================================================================
> ii libcunit1-dev 2.1-0.dfsg-9 Unit Testing
> Library for C -- development files
>
> lvm2$ dpkg-query -L libcunit1-dev
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/libcunit1-dev
> /usr/share/doc/libcunit1-dev/changelog.gz
> /usr/share/doc/libcunit1-dev/NEWS.gz
> /usr/share/doc/libcunit1-dev/AUTHORS
> /usr/share/doc/libcunit1-dev/TODO
> /usr/share/doc/libcunit1-dev/README.Debian-source
> /usr/share/doc/libcunit1-dev/copyright
> /usr/share/doc/libcunit1-dev/changelog.Debian.gz
> /usr/share/doc/libcunit1-dev/README.gz
> /usr/share/man
> /usr/share/man/man3
> /usr/share/man/man3/CUnit.3.gz
> /usr/include
> /usr/include/CUnit
> /usr/include/CUnit/CUError.h
> /usr/include/CUnit/CUnit.h
> /usr/include/CUnit/MyMem.h
> /usr/include/CUnit/TestDB.h
> /usr/include/CUnit/TestRun.h
> /usr/include/CUnit/Util.h
> /usr/include/CUnit/Basic.h
> /usr/include/CUnit/Console.h
> /usr/include/CUnit/Automated.h
> /usr/lib
> /usr/lib/libcunit.a
> /usr/lib/libcunit.la
> /usr/lib/libcunit.so
>
>
> Whats now?
>
> Regards,
> Oliver
>
> --
> lvm-devel mailing list
> lvm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/lvm-devel
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* libcunit not found but installed [was Re: more complex example_cmdlib.c ? ]
2013-11-25 16:25 ` Oliver Rath
2013-11-25 16:28 ` Zdenek Kabelac
@ 2013-11-25 16:30 ` Zdenek Kabelac
2013-11-25 16:59 ` SOLVED [was libcunit not found but installed ] Oliver Rath
1 sibling, 1 reply; 9+ messages in thread
From: Zdenek Kabelac @ 2013-11-25 16:30 UTC (permalink / raw)
To: lvm-devel
Dne 25.11.2013 17:25, Oliver Rath napsal(a):
> Hi Zdenek!
>
> Am 25.11.2013 17:20, schrieb Zdenek Kabelac:
>> Dne 25.11.2013 17:16, Zdenek Kabelac napsal(a):
>> [..]
>> You need devel packages for cunit if you want to link it.
>>
> was already installed:
>
> lvm2$ dpkg-query -l libcunit1-dev
> Gew?nscht=Unbekannt/Installieren/R=Entfernen/P=Vollst?ndig L?schen/Halten
> | Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
> Halb installiert/Trigger erWartet/Trigger anh?ngig
> |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
> GROSS=schlecht)
> ||/ Name Version Beschreibung
> +++-========================-========================-================================================================
> ii libcunit1-dev 2.1-0.dfsg-9 Unit Testing
> Library for C -- development files
>
> lvm2$ dpkg-query -L libcunit1-dev
> /.
> /usr
>
> Whats now?
>
look into config.log output from configure for a problem.
Seems there is no support for pk config in Ubuntu package like in Fedora:
i.e.:
/usr/lib64/pkgconfig/cunit.pc
---
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include
Name: CUnit
Description: C Unit Testing Framework
Version: 2.1
Libs: -L${libdir} -lcunit
Cflags: -I${includedir}
---
So either write something like this for you systems - or send a patch
with enhanced detection for CUnit for configure.in
Zdenek
^ permalink raw reply [flat|nested] 9+ messages in thread
* SOLVED [was libcunit not found but installed ]
2013-11-25 16:30 ` Zdenek Kabelac
@ 2013-11-25 16:59 ` Oliver Rath
0 siblings, 0 replies; 9+ messages in thread
From: Oliver Rath @ 2013-11-25 16:59 UTC (permalink / raw)
To: lvm-devel
Hi Zdenek!
Am 25.11.2013 17:30, schrieb Zdenek Kabelac:
> prefix=/usr
> exec_prefix=/usr
> libdir=/usr/lib64
> includedir=/usr/include
>
> Name: CUnit
> Description: C Unit Testing Framework
> Version: 2.1
> Libs: -L${libdir} -lcunit
> Cflags: -I${includedir}
Putting this file to/usr /lib/pkgconfig/cunit.pc solved my problem for
now. Thanks a lot! Furthermore unfortunatly i have noch idea how to
enhance configure.in for appropriate work in ubuntu, Ive never done this
before.
Regards,
Oliver
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-11-25 16:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 14:28 more complex example_cmdlib.c ? Oliver Rath
2013-11-25 15:11 ` Zdenek Kabelac
2013-11-25 15:41 ` libcunit not found but installed [was Re: more complex example_cmdlib.c ? ] Oliver Rath
2013-11-25 16:16 ` Zdenek Kabelac
2013-11-25 16:20 ` Zdenek Kabelac
2013-11-25 16:25 ` Oliver Rath
2013-11-25 16:28 ` Zdenek Kabelac
2013-11-25 16:30 ` Zdenek Kabelac
2013-11-25 16:59 ` SOLVED [was libcunit not found but installed ] Oliver Rath
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.