Comments (5)
Although I never tried it on openBSD, I guess that the problem above comes from the fact that the install script does not know that cc
means clang
. Can clang
be called directly on your machine?
$ clang -v
If so, you can try to run:
$GOBO/bin/install.sh clang
Also note that you may run into other problems because as I said above, openBSD is not part of my available platforms. GitHub Actions only provides Linux Ubuntu, MacOs and Windows.
from gobo.
Thanks for your swift reply and your suggestion! Looks better but does not compile fully.
tron$ clang -v
OpenBSD clang version 16.0.6
Target: amd64-unknown-openbsd7.5
Thread model: posix
InstalledDir: /usr/bin
tron$ ./bootstrap.sh clang
Executing bootstrap.sh...
Compiling gec (bootstrap 0)...
gec8.c(gec8.o:(GE_append_to_exception_trace_buffer)): warning: strcpy() is almost always misused, please use strlcpy()
gec8.c(gec8.o:(GE_raise_exception)): warning: sprintf() is often misused, please use snprintf()
Compiling gec (bootstrap 1)...
Degree 6: 0/0/0 0:0:0.049
Degree 5: 0/0/0 0:0:0.287
Degree 4: 0/0/0 0:0:0.153
Degree 3: 0/0/0 0:0:0.225
Degree -2: 0/0/0 0:0:1.625
Degree -3: 0/0/0 0:0:1.031
In file included from gec1.c:59:
In file included from /home/rpx/Downloads/eiffel/gobo/tool/gec/backend/c/boehm_gc/extra/gc.c:75:
/home/rpx/Downloads/eiffel/gobo/tool/gec/backend/c/boehm_gc/extra/../pthread_support.c:392:20: warning: call to undeclared function 'pthread_setname_np'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if (EXPECT(pthread_setname_np(pthread_self(), name_buf) != 0, FALSE))
^
1 warning generated.
gec2.c(gec2.o:(T49s1)): warning: strcpy() is almost always misused, please use strlcpy()
gec11.c(gec11.o:(GE_raise_exception)): warning: sprintf() is often misused, please use snprintf()
ld: error: undefined symbol: pthread_setname_np
>>> referenced by gec1.c
>>> gec1.o:(GC_mark_thread)
>>> did you mean: pthread_set_name_np
>>> defined in: /usr/lib/libpthread.so.27.1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Degree -4: 0/0/0 0:0:24.008
Total Time: 0/0/0 0:0:27.379
Compiling gec (bootstrap 2)...
mv: /home/rpx/Downloads/eiffel/gobo/bin/gec: No such file or directory
./bootstrap.sh[247]: /home/rpx/Downloads/eiffel/gobo/bin/gec1: not found
rm: /home/rpx/Downloads/eiffel/gobo/bin/gec1: No such file or directory
strip: error: 'gec': No such file or directory
Btw. I tried to copy the clang options as cc options in the bootstrap.sh file but this errors earlier as there are more switches later on.
Executing bootstrap.sh...
Compiling gec (bootstrap 0)...
gec8.c(gec8.o:(GE_append_to_exception_trace_buffer)): warning: strcpy() is almost always misused, please use strlcpy()
gec8.c(gec8.o:(GE_raise_exception)): warning: sprintf() is often misused, please use snprintf()
Compiling gec (bootstrap 1)...
Degree 6: 0/0/0 0:0:0.047
Degree 5: 0/0/0 0:0:0.335
Degree 4: 0/0/0 0:0:0.158
Degree 3: 0/0/0 0:0:0.210
Degree -2: 0/0/0 0:0:1.681
Degree -3: 0/0/0 0:0:1.051
cc: warning: argument unused during compilation: '-fast' [-Wunused-command-line-argument]
In file included from gec11.c:1:
./gec.h:2316:10: fatal error: 'gc.h' file not found
#include "gc.h"
^~~~~~
1 error generated.
Degree -4: 0/0/0 0:0:4.035
Total Time: 0/0/0 0:0:7.519
Compiling gec (bootstrap 2)...
mv: /home/rpx/Downloads/eiffel/gobo/bin/gec: No such file or directory
./bootstrap.sh[247]: /home/rpx/Downloads/eiffel/gobo/bin/gec1: not found
rm: /home/rpx/Downloads/eiffel/gobo/bin/gec1: No such file or directory
strip: error: 'gec': No such file or directory
Wonder if cc should not be equal to clang in general?
from gobo.
There seems to be even a switch in pthread:support.c
# ifdef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID /* iOS, OS X */
(void)pthread_setname_np(name_buf);
# elif defined(HAVE_PTHREAD_SET_NAME_NP) /* OpenBSD */
pthread_set_name_np(pthread_self(), name_buf);
# else /* Linux, Solaris, etc. */
if (EXPECT(pthread_setname_np(pthread_self(), name_buf) != 0, FALSE))
WARN("pthread_setname_np failed\n", 0);
# endif
So it seems HAVE_PTHREAD_SET_NAME_NP is not set?
from gobo.
For now I simply removed the code I do not need:
diff --git a/tool/gec/backend/c/boehm_gc/pthread_support.c b/tool/gec/backend/c/boehm_gc/pthread_support.c
index d344503da..295e84032 100644
--- a/tool/gec/backend/c/boehm_gc/pthread_support.c
+++ b/tool/gec/backend/c/boehm_gc/pthread_support.c
@@ -384,14 +384,7 @@
name_buf[len] = (char)('0' + id % 10);
name_buf[len + 1] = '\0';
-# ifdef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID /* iOS, OS X */
- (void)pthread_setname_np(name_buf);
-# elif defined(HAVE_PTHREAD_SET_NAME_NP) /* OpenBSD */
- pthread_set_name_np(pthread_self(), name_buf);
-# else /* Linux, Solaris, etc. */
- if (EXPECT(pthread_setname_np(pthread_self(), name_buf) != 0, FALSE))
- WARN("pthread_setname_np failed\n", 0);
-# endif
+ pthread_set_name_np(pthread_self(), name_buf);
}
# elif defined(GC_WIN32_THREADS) && !defined(MSWINCE)
Doing it properly would mean to define HAVE_PTHREAD_SET_NAME_NP in gec.h ?
#if defined(__clang__)
# define HAVE_DL_ITERATE_PHDR
# define GC_REQUIRE_WCSDUP
# define HAVE_DLADDR
# define HAVE_SYS_TYPES_H
# define HAVE_UNISTD_H
# if defined(GE_MACOS)
# define HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID
# elif !defined(GE_WINDOWS)
# define HAVE_PTHREAD_SETNAME_NP_WITH_TID
# define HAVE_PTHREAD_SIGMASK
# define NO_GETCONTEXT
# endif
#endif
from gobo.
The next issue appears now here:
Compiling gexslt...
Degree 6: 0/0/0 0:0:0.038
Degree 5: 0/0/0 0:0:0.550
Degree 4: 0/0/0 0:0:0.241
Degree 3: 0/0/0 0:0:0.159
Degree -2: 0/0/0 0:0:6.527
Degree -3: 0/0/0 0:0:2.742
gexslt25.c(gexslt25.o:(GE_append_to_exception_trace_buffer)): warning: strcpy() is almost always misused, please use strlcpy()
gexslt25.c(gexslt25.o:(GE_raise_exception)): warning: sprintf() is often misused, please use snprintf()
ld: error: undefined symbol: pow
>>> referenced by gexslt6.c
>>> gexslt6.o:(T371f46)
>>> referenced by gexslt6.c
>>> gexslt6.o:(T371f46)
>>> referenced by gexslt6.c
>>> gexslt6.o:(T17f41)
>>> referenced 13 more times
ld: error: undefined symbol: floor
>>> referenced by gexslt19.c
>>> gexslt19.o:(T836f115)
>>> referenced by gexslt19.c
>>> gexslt19.o:(T835f113)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Degree -4: 0/0/0 0:0:49.197
Total Time: 0/0/0 0:0:59.454
strip: error: 'gexslt': No such file or directory
Cleaning up...
I tried to link with -lm but doesn't seem to work. Any idea ?
/*
description:
"C functions used to implement class REAL"
system: "Gobo Eiffel Compiler"
copyright: "Copyright (c) 2006-2019, Eric Bezault and others"
license: "MIT License"
*/
#ifndef GE_REAL_H
#define GE_REAL_H
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
#ifndef GE_EIFFEL_H
#include "ge_eiffel.h"
#endif
#include <math.h>
#ifndef GE_power
#define GE_power(x,y) pow((x),(y))
#endif
#define GE_ceiling(x) ceil(x)
#define GE_floor(x) floor(x)
from gobo.
Related Issues (20)
- Use _stat instead of _stat64i32
- I'm trying to use an unsupported compiler HOT 2
- Another unsupported compiler HOT 4
- Develop without Eiffel Studio?
- How to have/write system.ecf? HOT 2
- Documentation sucks
- PECF support
- Q: how to print eiffel object size in bytes HOT 2
- Q: is it a real flaw in the Eiffel's renaming mechanism in this diamond problem? HOT 5
- How to set the make jobs used by `geant`? HOT 1
- Upgrade www.gobosoft.com to use https
- Gobo XPath library
- Q: how to find all the renamed attributes of a (AST processed) class in the gec compiler ? HOT 70
- gec compiler bug: type '[detachable] STRING_8' of actual argument #1 does not conform to type '[attached] UC_STRING' of formal argument in feature `is_equal' in class '[detachable] UC_STRING' HOT 3
- is it possible to support: **** language not recognized: C Macro use <ev_gtk.h> HOT 56
- /Eiffel_23.09/library/cURL/spec/include/eiffel_curl.h:18:10: fatal error: eif_eiffel.h: No such file or directory HOT 6
- Q: is there a way to print an object's memory address in Eiffel? HOT 7
- build failure: undeclared function 'T238f30e1' HOT 2
- change `HASH_TABLE` to `DS_HASH_TABLE`, the `gec` build program (via `make gobo`) will segfault HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gobo.