OpenWrt Forum Archive

Topic: problem compiling ferite language with experimental build

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hello

I have problems compiling ferite scripting language with experimental building environment. Here is the error :

/spare/openwrt/sdk/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -D_REENTRANT -DUSE_PTHREAD -DTHREAD_SAFE -I. -I. -I../../.. -I../../../libs/aphex/include -I../../../include -I/usr/include -I/usr/include -Os -pipe -mips32 -mtune=mips32 -c poll.c  -fPIC -DPIC -o .libs/poll.lo
poll.c: In function `map_select_results':
poll.c:233: error: impossible constraint in `asm'
poll.c:236: error: impossible constraint in `asm'
poll.c:239: error: impossible constraint in `asm'
{standard input}: Assembler messages:
{standard input}:38: Error: unrecognized opcode `btsl $3,0($2)'
{standard input}:52: Error: unrecognized opcode `btsl $3,0($2)'
{standard input}:66: Error: unrecognized opcode `btsl $3,0($2)'
make[6]: *** [poll.lo] Erreur 1

and the source code :

   246    /*---------------------------------------------------------------------------*
   247                     Public Functions
   248    *---------------------------------------------------------------------------*/
   249    
   250    int poll
   251    
   252    #if __STDC__ > 0
   253        (struct pollfd *pArray, unsigned long n_fds, int timeout)
   254    #else
   255        (pArray, n_fds, timeout)
   256         struct           pollfd *pArray;
   257         unsigned long n_fds;
   258         int           timeout;
   259    #endif
   260    
   261    {
   262        fd_set  read_descs;                          /* input file descs */
   263        fd_set  write_descs;                         /* output file descs */
   264        fd_set  except_descs;                        /* exception descs */
   265        struct  timeval stime;                       /* select() timeout value */
   266        int        ready_descriptors;                   /* function result */
   267        int        max_fd;                              /* maximum fd value */
   268        struct  timeval *pTimeout;                   /* actually passed */
   269    
   270        FD_ZERO (&read_descs);
   271        FD_ZERO (&write_descs);
   272        FD_ZERO (&except_descs);
   273    
   274        assert (pArray != (struct pollfd *) NULL);
   275    
   276        /* Map the poll() file descriptor list in the select() data structures. */
   277    
   278        max_fd = map_poll_spec (pArray, n_fds,
   279                    &read_descs, &write_descs, &except_descs);
   280    
   281        /* Map the poll() timeout value in the select() timeout structure. */
   282    
   283        pTimeout = map_timeout (timeout, &stime);
   284    
   285        /* Make the select() call. */
   286    
   287        ready_descriptors = select (max_fd + 1, &read_descs, &write_descs,
   288                    &except_descs, pTimeout);
   289    
   290        if (ready_descriptors >= 0)
   291        {
   292        map_select_results (pArray, n_fds,
   293                    &read_descs, &write_descs, &except_descs);
   294        }
   295    
   296        return ready_descriptors;
   297    }

any idea ?

link : http://www.ferite.org/

I'm currently making some tests with CVS sources ...

_marc_,

you should prevent the various configure / Makefiles from using -I/usr/include or -L/usr/lib.

I'll try to built it to give you more hints...

--
Nico

I'll try to built it to give you more hints...

nice ;-)

here is what needs to be corrected :

[marc@mq ferite-0.99.6]$ find . -name '*.am' | xargs grep -- '-I$(includedir)'
./tools/generate-module/skel/Makefile.am:CFLAGS_EXTRA = -I$(includedir) -I$(top_srcdir)
./libs/triton/src/Makefile.am:INCLUDES             = -I${top_srcdir}/libs/triton/include -I${top_srcdir}/include -I${prefix}/include -I$(includedir) @TRITON_INCS@
./libs/aphex/src/Makefile.am:INCLUDES             = -I${top_srcdir}/libs/aphex/include -I${top_srcdir}/include -I${prefix}/include -I$(includedir) @aphex_INCS@
./src/Makefile.am:INCLUDES         = -I$(top_srcdir)/libs/aphex/include -I$(top_srcdir)/libs/triton/include/ -I${top_srcdir}/include -I${prefix}/include -I$(includedir) -I${top_srcdir}/include/ferite/ @pcre_cflags@
./builder/Makefile.am:-I$(includedir) -I$(prefix)/include
./test/Makefile.am:-I$(includedir) -I$(prefix)/include

* we need to suppress -I${prefix}/include -I$(includedir) in each those Makefile.am
* then, if I am not wrong :

aclocal
automake

I can compile partialy package with this Makefile directive :

$(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured
    $(MAKE) -f Makefile CC="$(TARGET_CC)" 
    INCLUDES='-I$(PKG_BUILD_DIR)/libs/aphex/include -I$(PKG_BUILD_DIR)/libs/triton/include -I$(PKG_BUILD_DIR)/include -Imq' 
    STRIP="$(STRIP)" OPTIMIZE="$(TARGET_CFLAGS)" -C $(PKG_BUILD_DIR)
    @echo $(STRIP) $@

now I need to include/link with PCRE, I don't nkow how to achieve that, because, there is no pcre SDK in standard buildroot, just build_mipsel/pcre-5.0 ; is there any way to acces this library ?

I can compile partialy package with this Makefile directive :
now I need to include/link with PCRE, I don't nkow how to achieve that, because, there is no pcre SDK in standard buildroot, just build_mipsel/pcre-5.0 ; is there any way to acces this library ?

sorry, pcre sdk is included ...

The discussion might have continued from here.