Code Monkey home page Code Monkey logo

build-anywhere's Issues

how to build https://github.com/Juan-Cortez3/pdd ?

I downloaded the tar.xz, extracted to /opt and ran the initialization script.
Then I downloaded a small c file from https://github.com/Juan-Cortez3/pdd and ran ./autogen.sh, configure and make.

It fails like this:

# make
clang -DPACKAGE_NAME=\"pdd\" -DPACKAGE_TARNAME=\"pdd\" -DPACKAGE_VERSION=\"1.0.0\" -DPACKAGE_STRING=\"pdd\ 1.0.0\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pdd\" -DVERSION=\"1.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_PTHREAD_H=1 -I.   --gcc-toolchain=/opt/x86_64-anywhere-linux-gnu --sysroot=/opt/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot  --gcc-toolchain=/opt/x86_64-anywhere-linux-gnu --sysroot=/opt/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot -march=x86-64 -fPIC -Oz  -MT pdd.o -MD -MP -MF .deps/pdd.Tpo -c -o pdd.o `test -f 'src/pdd.c' || echo './'`src/pdd.c
src/pdd.c:64:37: warning: incompatible pointer types initializing 'int *' with an expression of type 'uint8_t *'
      (aka 'unsigned char *') [-Wincompatible-pointer-types]
     {"verbose", no_argument,       &flag_verbose, 1},
                                    ^~~~~~~~~~~~~
src/pdd.c:86:5: warning: implicit declaration of function 'verify_global_var' is invalid in C99
      [-Wimplicit-function-declaration]
    verify_global_var();
    ^
src/pdd.c:112:15: warning: implicit declaration of function 'pthread_create' is invalid in C99
      [-Wimplicit-function-declaration]
        ret = pthread_create(&tinfo[i].thread_id, NULL, trans_data, &tinfo[i]);
              ^
src/pdd.c:120:15: warning: implicit declaration of function 'pthread_join' is invalid in C99
      [-Wimplicit-function-declaration]
        ret = pthread_join(tinfo[i].thread_id, &res);
              ^
src/pdd.c:266:1: error: conflicting types for 'verify_global_var'
verify_global_var(void)
^
src/pdd.c:86:5: note: previous implicit declaration is here
    verify_global_var();
    ^
src/pdd.c:316:76: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'int *';
      take the address with & [-Wint-conversion]
    while (-1 != (c_opt = getopt_long(argc, argv, short_opt, long_options, option_index))) {
                                                                           ^~~~~~~~~~~~
                                                                           &
/opt/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/include/getopt.h:177:49: note: passing
      argument to parameter '__longind' here
                        const struct option *__longopts, int *__longind)
                                                              ^
src/pdd.c:324:13: error: void function 'scan_args' should not return a value [-Wreturn-type]
            return 0;
            ^      ~
5 warnings and 2 errors generated.
Makefile:384: recipe for target 'pdd.o' failed
make: *** [pdd.o] Error 1

without build-anywhere, it succeeds like this:

gcc -DPACKAGE_NAME=\"pdd\" -DPACKAGE_TARNAME=\"pdd\" -DPACKAGE_VERSION=\"1.0.0\" -DPACKAGE_STRING=\"pdd\ 1.0.0\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pdd\" -DVERSION=\"1.0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_PTHREAD_H=1 -I.     -g -O2 -MT pdd.o -MD -MP -MF .deps/pdd.Tpo -c -o pdd.o `test -f 'src/pdd.c' || echo './'`src/pdd.c
src/pdd.c:64:37: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
      {"verbose", no_argument,       &flag_verbose, 1},
                                     ^
src/pdd.c:64:37: note: (near initialization for ‘long_options[0].flag’)
src/pdd.c: In function ‘main’:
src/pdd.c:86:5: warning: implicit declaration of function ‘verify_global_var’; did you mean ‘init_global_var’? [-Wimplicit-function-declaration]
     verify_global_var();
     ^~~~~~~~~~~~~~~~~
     init_global_var
src/pdd.c:112:15: warning: implicit declaration of function ‘pthread_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
         ret = pthread_create(&tinfo[i].thread_id, NULL, trans_data, &tinfo[i]);
               ^~~~~~~~~~~~~~
               timer_create
src/pdd.c:120:15: warning: implicit declaration of function ‘pthread_join’ [-Wimplicit-function-declaration]
         ret = pthread_join(tinfo[i].thread_id, &res);
               ^~~~~~~~~~~~
src/pdd.c: At top level:
src/pdd.c:266:1: warning: conflicting types for ‘verify_global_var’
 verify_global_var(void)
 ^~~~~~~~~~~~~~~~~
src/pdd.c:86:5: note: previous implicit declaration of ‘verify_global_var’ was here
     verify_global_var();
     ^~~~~~~~~~~~~~~~~
src/pdd.c: In function ‘scan_args’:
src/pdd.c:316:76: warning: passing argument 5 of ‘getopt_long’ makes pointer from integer without a cast [-Wint-conversion]
     while (-1 != (c_opt = getopt_long(argc, argv, short_opt, long_options, option_index))) {
                                                                            ^~~~~~~~~~~~
In file included from /usr/include/getopt.h:36:0,
                 from src/pdd.c:39:
/usr/include/x86_64-linux-gnu/bits/getopt_ext.h:66:12: note: expected ‘int *’ but argument is of type ‘int’
 extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
            ^~~~~~~~~~~
src/pdd.c:324:20: warning: ‘return’ with a value, in function returning void
             return 0;
                    ^
src/pdd.c:303:1: note: declared here
 scan_args(int argc, char *argv[])
 ^~~~~~~~~
mv -f .deps/pdd.Tpo .deps/pdd.Po
gcc  -g -O2   -o pdd pdd.o  -lpthread

will-it-run script to check linkage requirements and x86 extensions

After a binary or library is built we want to check the linkage requirements.

  1. run ldd -v and check the glibc version requirement.
  2. check a small-list of expected dynamic link requirements (m, rt, pthreads, z)
  3. disassemble and search for vector/etc instructions that only exist on newer CPUs (non-deterministic check)

Would a cython python app benefit from this/how do i do this?

Hi. I downloaded the precompiled version of build-anywhere earlier today. Then:
source /home/kris/x86_64-anywhere-linux-gnu

Then i made a .c file with cython(embedding the python interpreter):
cython --embed -3 program.py
this depends upon pyqt5 and enum(that again depends on some other standard libs in /usr/lib/python3.7 im not sure how to include).

Then how shall i compile this app making sure i include the right dependencies? I don't care if i have to copy the whole /usr/lib/python3.7 folder and set the sys.path inside the python program to look inside customdir/python3.7 if this is the only option, but first and foremost i just want to compile the app.

Then i will try to copy it to centos6 VM just to see if it runs.

Using x86_64-anywhere-linux-gnu-v5 to build ssdeep-2.14.1, it got build failed result

Platform: X86_64 PC
OS: Ubuntu 18.04 (Usinig OS-release upgrade from 16.04)
x86_64-anywhere-linux-gnu release version: x86_64-anywhere-linux-gnu-v5.tar.xz
ssdeep version: 2.14.1

Step:

  1. tar Jxf x86_64-anywhere-linux-gnu-v5.tar.xz
  2. cp -a x86_64-anywhere-linux-gnu /tmp/
  3. source /tmp/x86_64-anywhere-linux-gnu/scripts/anywhere-setup.sh
  4. cd ssdeep-2.14.1/
  5. ./configure --disabled-shared -> got below error message
    configure: error: unrecognized option: --disabled-shared' Try ./configure --help' for more information
  6. ./configure
  7. make -> got build failed.
    InstalledDir: /tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin
    "/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin/ld" --sysroot=/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -shared -o .libs/libfuzzy.so.2.1.0 /tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin/../lib64/crti.o crtbeginS.o -L/usr/local/lib -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin/../lib64 -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/lib/../lib64 -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/lib/../lib64 -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin/../lib -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/lib -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/lib .libs/fuzzy.o .libs/edit_dist.o .libs/find-file-size.o -l:libc++.a -l:libc++abi.a -l:libunwind.a -lpthread -ldl -lrt -lz -lm -z relro -z now -soname libfuzzy.so.2 -L/tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/lib -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtendS.o /tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin/../lib64/crtn.o
    /tmp/x86_64-anywhere-linux-gnu/x86_64-anywhere-linux-gnu/sysroot/usr/bin/ld: cannot find crtbeginS.o: No such file or directory
    clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
    Makefile:490: recipe for target 'libfuzzy.la' failed
    make[1]: *** [libfuzzy.la] Error 1
    make[1]: Leaving directory '/home/sqa/ssdeep-2.14.1'
    Makefile:401: recipe for target 'all' failed
    make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.