Menu

#64 Problem building winexe on CentOS smb_static.objlist.empty.c

1.1
open
nobody
None
medium
2017-06-06
2015-01-15
aipetri
No

Steps:
Trying to build WinExe on CentOS 6.4
Linux centos64-x64-single 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Pretty much follow all the instructions from README, no deviation.

Build command:
./waf configure --samba-dir=../../samba configure build

Build fails with the following error:

[3516/4035] Compiling default/source/smb_static/smb_static.objlist.empty.c
Waf: Leaving directory `/root/code/samba/bin'
Build failed: could not find 'source/smb_static/smb_static.objlist.empty.c' for
{task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
Checking for library smb_static : not found
Build of static winexe : disabled
Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
(complete log in /root/code/winexe-waf/source/build/config.log)

Content of the config.log:

project configured on Wed Jan 14 19:06:30 2015 by

waf 1.7.5 (abi 98, python 20606f0 on linux2)

using ./waf configure --samba-dir=../../samba configure build


Setting top to
/root/code/winexe-waf/source


Setting out to
/root/code/winexe-waf/source/build


Checking for 'gcc' (c compiler)
find program=['gcc', 'cc'] paths=['/usr/local/sbin', '/usr/local/bin', '/sbin', '/bin', '/usr/sbin', '/usr/bin', '/root/bin'] var='CC' -> '/usr/bin/gcc'
find program=['ar'] paths=['/usr/local/sbin', '/usr/local/bin', '/sbin', '/bin', '/usr/sbin', '/usr/bin', '/root/bin'] var='AR' -> '/usr/bin/ar'
/usr/bin/gcc


Checking for program /root/code/samba/buildtools/bin/waf
/root/code/samba/buildtools/bin/waf
find program=['/root/code/samba/buildtools/bin/waf'] paths=['/usr/local/sbin', '/usr/local/bin', '/sbin', '/bin', '/usr/sbin', '/usr/bin', '/root/bin'] var='/ROOT/CODE/SAMBA/BUILDTOOLS/BIN/WAF' -> '/root/code/samba/buildtools/bin/waf'


Checking for library smb_static
==>

int main(int argc, char **argv) {
return 0;
}

<==
[1/2] c: build/.conf_check_5795990513c13d4d498d73a57d13bfad/test.c -> build/.conf_check_5795990513c13d4d498d73a57d13bfad/testbuild/test.c.1.o

['/usr/bin/gcc', '../test.c', '-c', '-o', 'test.c.1.o']
[2/2] cprogram: build/.conf_check_5795990513c13d4d498d73a57d13bfad/testbuild/test.c.1.o -> build/.conf_check_5795990513c13d4d498d73a57d13bfad/testbuild/testprog

['/usr/bin/gcc', 'test.c.1.o', '-o', '/root/code/winexe-waf/source/build/.conf_check_5795990513c13d4d498d73a57d13bfad/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/root/code/winexe-waf/source/smb_static/build', '-lsmb_static']
err: /usr/bin/ld: cannot find -lsmb_static
collect2: ld returned 1 exit status

from /root/code/winexe-waf/source: Test does not build: Traceback (most recent call last):
File "/root/code/winexe-waf/source/.waf-1.7.5-47d5afdb5e7e2856f7f46a7101914026/waflib/Tools/c_config.py", line 451, in run_c_code
bld.compile()
File "/root/code/winexe-waf/source/.waf-1.7.5-47d5afdb5e7e2856f7f46a7101914026/waflib/Build.py", line 198, in compile
raise Errors.BuildError(self.producer.error)
BuildError: Build failed
-> task in 'testprog' failed (exit status 1):
{task 24206288: cprogram test.c.1.o -> testprog}
['/usr/bin/gcc', 'test.c.1.o', '-o', '/root/code/winexe-waf/source/build/.conf_check_5795990513c13d4d498d73a57d13bfad/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-L/root/code/winexe-waf/source/smb_static/build', '-lsmb_static']

not found
from /root/code/winexe-waf/source: The configuration failed


Build of static winexe
disabled
from /root/code/winexe-waf/source: Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
[root@centos64-x64-single source]#

Discussion

  • aipetri

    aipetri - 2015-01-21

    Update:
    There seems to be a commit in the samba repo that cause this issue
    If I revert my samba repo to this rev and recompile it, it works.
    Commit ID: a6bda1f2bc85779feb9680bc74821da5ccd401c5

     
  • Holger Pandel

    Holger Pandel - 2015-02-05

    Sorry, didn't see #58, my post was essentially about the same prob with unlinked gnutls deps.

     

    Last edit: Holger Pandel 2015-02-05
  • Jason Haar

    Jason Haar - 2015-06-29

    See probably related #70 "winexe cannot connect to Win10 machines"

     
  • David R. Fischer

    I was able to get past static compile on basic cent OS 7.3 clean install with samba 4-3-stable
    **NOTE: no samba was installed on the install
    git clone git://git.samba.org/samba.git samba -b v4-3-stable

    what i did was
    mv smb_static/ smb_static.orig
    ln -s ../samba/bin/default/smb_static/ smb_static/
    this allowed that static to compile
    changed wscript_build
    changes in "if bld.env.SAMBA_DIR:"
    *** lib='dl gnutls'

     

    Last edit: David R. Fischer 2017-05-15
  • Ben

    Ben - 2017-05-17

    Hi David,
    That was good timing - I foudn your comment today 1 day old, on an otherwise stale thread :-)

    Trying to follow your steps above though,

    original contents of smb_static dir:
    $ ls smb_static.orig/
    build wscript wscript_build

    Contents of the symlinked one you created:
    $ ls ../samba/bin/default/smb_static/
    smb_static.objlist.empty_2.d smb_static.objlist.empty_2.o smb_static.objlist.empty.c

    Am I missing something?

     
  • David R. Fischer

    so the link i did is below. I also moved all the files in the winexec-winexe-waf/source/smb_static into the winexe-winexe-waf/samba/bin/default/smb_static

    lrwxrwxrwx. 1 root root 57 May 15 13:46 smb_static -> /root/git/winexe-winexe-waf/samba/bin/default/smb_static/

     
  • Ben

    Ben - 2017-05-17

    Thanks David!

     
  • Mai

    Mai - 2017-05-24

    Hi David,
    Did you do anything else aside from doing the symlink ? which winexe commit are you using ?
    I'm getting this error while compiling

    /home/rpmbuild/winexe-rpm/BUILD/winexe-1.1/source/smb_static/build/libsmb_static .a(debug_8.o): In function dbgtext': debug.c:(.text+0x1d09): multiple definition ofdbgtext'
    debug.c.6.o:debug.c:(.text+0x0): first defined here
    collect2: error: ld returned 1 exit status
    Waf: Leaving directory `/home/rpmbuild/winexe-rpm/BUILD/winexe-1.1/source/build'
    Build failed
    -> task in 'winexe' failed (exit status 1):
    {task 34928848: cprogram winexe.c.6.o,svcinstall.c.6.o,async.c.6.o,debug .c.6.o,winexesvc32_exe.c.6.o,winexesvc64_exe.c.6.o -> winexe}

     
  • Mai

    Mai - 2017-05-25

    nevermind, i got it to work. I had to use commit hash '21c1ad4d17e923dd38799a5083c4001ba91d9a26' from Michael Stowe version. I applied your folder symlink and update wscript to build samba with --disable-gnutls

    For some reason even updating wscript_build with lib='dl gnutls' under bld.env.SAMBA_DIR , i continue to get error on undefined : 'gcry_control'

    I am going to retest to see if i can build samba without disabling gnutls

     
  • Tintn

    Tintn - 2017-06-06

    I am getting the same error on CentOS7 and Ubuntu Desktop 16.04...

    [3334/3819] Compiling default/smb_static/smb_static.objlist.empty.c
    Waf: Leaving directory `/root/u-mstowe-winexe/samba/bin'
    Build failed: could not find 'smb_static/smb_static.objlist.empty.c' for
    {task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
    Checking for library smb_static : not found
    Build of static winexe : disabled

     

Log in to post a comment.

MongoDB Logo MongoDB