Skip to contentSkip to conversation

Advice on how to build TGT

Buildroot Benedikt Riedel 3 participants 3 messages Apr 18, 2015

lore
Share & tools
lore
#0 lore raw

I am trying to get this application into my buildroot to provide and manage iSCSI targets

http://stgt.sourceforge.net/

The package is compiling/installing, however I am not able to run the service or the binary.

# tgtd

-sh: tgtd: not found

The config.in is fairly simple:

STGT_VERSION= 1.0.57

STGT_SOURCE = v1.0.57.tar.gz

STGT_SITE = https://github.com/fujita/tgt/archive/

STGT_AUTORECONF = NO

STGT_INSTALL_STAGING = NO

STGT_INSTALL_TARGET = YES

STGT_DEPENDENCIES = uclibc

$(eval $(autotools-package))

Any suggestion on what I am missing or an alternative iSCSI target that works with kernel >3.18 would be appreciated.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150418/e4cb098e/attachment.html>

#1 lore raw

Dear Benedikt Riedel,

Quoted 7 lines · Benedikt Riedel

I am trying to get this application into my buildroot to provide and manage iSCSI targets

http://stgt.sourceforge.net/

Quoted 8 lines

The package is compiling/installing, however I am not able to run the service or the binary.

# tgtd

-sh: tgtd: not found

This most likely mean you're running the tgtd binary on a system which isn't the system generated by Buildroot. This message typically shows up when the dynamic loader referenced by the tgtd binary is not available on the current system.

Are you actually running the complete system generated by Buildroot on your target platform?

Quoted 1 line

The config.in is fairly simple:

I guess you mean .mk file, right?

Quoted 6 lines

STGT_VERSION= 1.0.57

STGT_SOURCE = v1.0.57.tar.gz

STGT_SITE = https://github.com/fujita/tgt/archive/

If possible, use the github function.

Quoted 7 lines

STGT_AUTORECONF = NO

STGT_INSTALL_STAGING = NO

STGT_INSTALL_TARGET = YES

STGT_DEPENDENCIES = uclibc

None of these four lines are needed. Either they are the default, or at they are wrong (SITE_DEPENDENCIES = uclibc).

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw
In reply to Benedikt Riedel

Benedikt, All,

On 2015-04-18 16:14 +0100, Benedikt Riedel spake thusly:

Quoted 22 lines

I am trying to get this application into my buildroot to provide and manage iSCSI targets

[1]http://stgt.sourceforge.net/

The package is compiling/installing, however I am not able to run the service or the binary.

# tgtd

-sh: tgtd: not found

The config.in is fairly simple:

Quoted 5 lines

STGT_VERSION= 1.0.57

STGT_SOURCE = v1.0.57.tar.gz

STGT_SITE = https://github.com/fujita/tgt/archive/

Please use the github helper. See the manual:
http://buildroot.net/downloads/manual/manual.html#github-download-url

Quoted 1 line

STGT_AUTORECONF = NO

Unneeded since that's the default. Anyway, wrong since it's not an autotools package (see below).

Quoted 2 lines

STGT_INSTALL_STAGING = NO
STGT_INSTALL_TARGET = YES

Unneeded, that's the default.

Quoted 1 line

STGT_DEPENDENCIES = uclibc

Incorrect. And anyway, the dependency on the toolchain is automatic.

Quoted 1 line

$(eval $(autotools-package))

I'm very surprised this works, since tgt does not have configure, nor does it have configure.ac or Makefile.am or the other autotools-related files.

What you want to use is the generic-package infrastructure. See the manual.

Quoted 2 lines

Any suggestion on what I am missing or an alternative iSCSI target that works with kernel >3.18 would be appreciated.

Well, I've had a quick look at tgt, and it seems it will be hard (very hard) to cross-compile, given the way the Makefiles are written. For example, there's a ton of things like (in usr/Makefile):

    ifneq ($(shell test -e /usr/include/linux/signalfd.h && echo 1),)
    CFLAGS += -DUSE_SIGNALFD
    endif

which are clearly wrong for cross-compilation.

tgt would indeed be a nice addition, but it would need quite some love and care... :-/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'