Skip to content

Build error on Solaris #16

Open

Description

@yvoinov

With GCC 5.5:

make

cc -m64 -O3 -std=gnu11 -Wall -mpclmul -march=native -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT="2fd27cb0753c62e5766c86db28f2acc1d755547f" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -iquote common -iquote . -c -MP -MD -MF dep/mtproto/mtproto-proxy.d -MQ objs/mtproto/mtproto-proxy.o -o objs/mtproto/mtproto-proxy.o mtproto/mtproto-proxy.c
cc: Warning: GCC option -mpclmul ignored. Suggest using -xarch=aes
cc: Warning: Option -mfpmath=sse passed to ld, if ld is invoked, ignored otherwise
cc: Warning: Option -fno-strict-overflow passed to ld, if ld is invoked, ignored otherwise
cc: Warning: Option -fwrapv passed to ld, if ld is invoked, ignored otherwise
cc: Warning: Option -quote passed to ld, if ld is invoked, ignored otherwise
cc: Warning: Option -quote passed to ld, if ld is invoked, ignored otherwise
cc: refused to overwrite input file by output file: objs/mtproto/mtproto-proxy.o
make: *** [Makefile:78: objs/mtproto/mtproto-proxy.o] Error 1

It seems as Makefile error.

Ah, I see. This is not portable code, will not build on Solaris in any way. Sorry and sadly.

Activity

  1. sburn commented on Jun 11, 2018

    @sburn

    Guys, add BSD support, please!

  2. yvoinov commented on Jun 11, 2018

    @yvoinov
    Author
  3. marmulak commented on Sep 6, 2018

    @marmulak

    There's no good reason why a program like this shouldn't compile and run on any *nix type system. Its only dependencies are openssl and zlib ...

  4. yvoinov commented on Sep 6, 2018

    @yvoinov
    Author
  5. stek29 commented on Sep 6, 2018

    @stek29
    Collaborator

    @marmulak is using epoll a good reason?

  6. marmulak commented on Sep 6, 2018

    @marmulak

    Well I'm looking into this a little bit and apparently epoll is not available for FreeBSD and apparently not in its Linux emulation layer either (I only saw a brief reference to this so I'm not sure), but BSD systems have their own function, kqueue, which appears to do what epoll does. MTProxy can support multiple platforms. Obviously BSD is a worthwhile target, so you might want to add the ability to compile with kqueue on BSD systems, or search for an alternative method to get it to work.

    http://people.eecs.berkeley.edu/~sangjin/2012/12/21/epoll-vs-kqueue.html

    ^ According to this guy, kqueue is better anyway. :)

    Apparently there's more than one article about why epoll sucks: https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12/

  7. yvoinov commented on Sep 6, 2018

    @yvoinov
    Author
  8. marmulak commented on Sep 6, 2018

    @marmulak

    So perhaps libevent can provide the necessary abstraction to make the software cross-platform? True there are many OS's out there. I'm particularly interested in BSD as I have a BSD server I would like to run this on, and actually it doesn't seem like a totally unreasonable expectation. A great many servers run BSD, and perhaps even Windows support can be added as well.

  9. stek29 commented on Sep 6, 2018

    @stek29
    Collaborator

    @marmulak I just wanted to show you the reason why it doesn't work on BSDs now, not the reason it can't work there.
    Nobody is going to rewrite all of this with libev/kqueue -- just use alternative implementations.

  10. bao3 commented on Mar 17, 2019

    @bao3

    Guys, I built in FreeBSD 12 with gmake , got the same issue.

    
    teleMTP /root/MTProxy >gmake                                                                            
    cc  -O3 -std=gnu11 -Wall -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-ove
    rflow -fwrapv -DAES=1 -DCOMMIT=\"2c942119c4ee340c80922ba11d14fb3b10d5e654\" -D_GNU_SOURCE=1 -D_FILE_OFFS
    ET_BITS=64 -iquote common -iquote . -c -MP -MD -MF dep/mtproto/mtproto-proxy.d -MQ objs/mtproto/mtproto-
    proxy.o -o objs/mtproto/mtproto-proxy.o mtproto/mtproto-proxy.c                                         
    cc: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
    In file included from mtproto/mtproto-proxy.c:53:                                                       
    In file included from ./net/net-tcp-connections.h:28:                                                   
    In file included from ./net/net-connections.h:34:                                                       
    ./jobs/jobs.h:234:23: error: field has incomplete type 'struct drand48_data'                            
      struct drand48_data rand_data;                                                                        
                          ^                                                                                 
    ./jobs/jobs.h:234:10: note: forward declaration of 'struct drand48_data'                                
      struct drand48_data rand_data;                                                                        
             ^                                                                                              
    mtproto/mtproto-proxy.c:2007:9: warning: implicit declaration of function 'kill' is invalid in C99      
          [-Wimplicit-function-declaration]                                                                 
            kill (pids[i], SIGKILL);                                                                        
            ^                                                                                               
    mtproto/mtproto-proxy.c:2007:24: error: use of undeclared identifier 'SIGKILL'                          
            kill (pids[i], SIGKILL);                                                                        
                           ^                                                                                
    mtproto/mtproto-proxy.c:2019:7: warning: implicit declaration of function 'kill' is invalid in C99      
          [-Wimplicit-function-declaration]                                                                 
          kill (pids[i], signal);                                                                           
          ^                                                                                                 
    mtproto/mtproto-proxy.c:2038:26: error: use of undeclared identifier 'SIGTERM'                          
              kill_children (SIGTERM);                                                  
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions