Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many compilation errors in libc #10

Closed
stopiccot opened this issue Jul 8, 2013 · 2 comments
Closed

Many compilation errors in libc #10

stopiccot opened this issue Jul 8, 2013 · 2 comments

Comments

@stopiccot
Copy link
Contributor

Even with experimental va_args support (it may not work in runtime but at least compiles) there are too many errors while compiling libc. A lot of errors with __weak_reference macro. And there a lot of errors in gen/sem.c file. Many there are some broken files\headers?

/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/sys/sigwait.c:34:1: error: use of undeclared identifier '_sigwait'; did you mean 'sigwait'?
__weak_reference(__sigwait, sigwait);

/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:95:30: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        if ((sem != NULL) && ((*sem)->magic == SEM_MAGIC))
                              ~~~~~~^~
                                    .
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:95:32: error: no member named 'magic' in 'struct _sem'; did you mean '_magic'?
        if ((sem != NULL) && ((*sem)->magic == SEM_MAGIC))
                                      ^~~~~
                                      _magic
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/../../include/semaphore.h:40:13: note: '_magic' declared here
        __uint32_t      _magic;
                        ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:107:29: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        _pthread_mutex_destroy(&sem->lock);
                                ~~~^~
                                   .
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:107:31: error: no member named 'lock' in 'struct _sem'
        _pthread_mutex_destroy(&sem->lock);
                                ~~~  ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:108:28: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        _pthread_cond_destroy(&sem->gtzero);
                               ~~~^~
                                  .
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:108:30: error: no member named 'gtzero' in 'struct _sem'
        _pthread_cond_destroy(&sem->gtzero);
                               ~~~  ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:109:5: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        sem->magic = 0;
        ~~~^~
           .
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:109:7: error: no member named 'magic' in 'struct _sem'; did you mean '_magic'?
        sem->magic = 0;
             ^~~~~
             _magic
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/../../include/semaphore.h:40:13: note: '_magic' declared here
        __uint32_t      _magic;
                        ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:109:13: error: expression is not assignable
        sem->magic = 0;
        ~~~~~~~~~~ ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:110:7: error: passing 'sem_t' (aka 'struct _sem') to parameter of incompatible type 'void *'
        free(sem);
             ^~~
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/../../include/stdlib.h:93:18: note: passing argument to parameter here
void     free(void *);
                    ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:120:10: error: returning 'void *' from a function with incompatible result type 'sem_t' (aka 'struct _sem')
                return (NULL);
                       ^~~~~~
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:123:8: error: used type 'sem_t' (aka 'struct _sem') where arithmetic or pointer type is required
        sem = (sem_t)malloc(sizeof(struct sem));
              ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:124:10: error: invalid operands to binary expression ('sem_t' (aka 'struct _sem') and 'void *')
        if (sem == NULL) {
            ~~~ ^  ~~~~
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:126:10: error: returning 'void *' from a function with incompatible result type 'sem_t' (aka 'struct _sem')
                return (NULL);
                       ^~~~~~
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:129:5: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        sem->count = (u_int32_t)value;
        ~~~^~
           .
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:129:7: error: no member named 'count' in 'struct _sem'
        sem->count = (u_int32_t)value;
        ~~~  ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:130:5: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        sem->nwaiters = 0;
        ~~~^~
           .
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:130:7: error: no member named 'nwaiters' in 'struct _sem'
        sem->nwaiters = 0;
        ~~~  ^
/Users/stopiccot/code/flash/crossbridge/build/mac/lib/src/lib/libc/gen/sem.c:131:5: error: member reference type 'sem_t' (aka 'struct _sem') is not a pointer; maybe you meant to use '.'?
        sem->magic = SEM_MAGIC;
        ~~~^~
       .
@stopiccot
Copy link
Contributor Author

On which version of FreeBSD flascc 1.1 is intended to be based on? (flascc 1.0.1 -> freebsd 8.0, flascc 1.1 -> ???)

@cbakgly
Copy link
Contributor

cbakgly commented Jul 10, 2013

9.0. But 8.0 should work also. Extra files were added to avm2_env. It will be cleaned up and rolled back to 8.0

@cbakgly cbakgly closed this as completed Jul 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants