I compiled perftest manually on Ubuntu, and ran into a couple compile errors. Also, perftest doesn't need to link directly against libminocaos.
@@ -54,8 +54,6 @@ OBJS = copy.o \
stat.o \
write.o \
-DYNLIBS = -lminocaos
-
DIRS = perflib
include $(SRCROOT)/os/minoca.mk
@@ -29,7 +29,6 @@ from menv import application, sharedLibrary;
function build() {
var app;
- var dynlibs;
var entries;
var includes;
var libSources;
@@ -63,17 +62,13 @@ function build() {
"perflib/perflib.c"
];
- dynlibs = [
- "apps/osbase:libminocaos"
- ];
includes = [
"$S/apps/libc/include"
app = {
"label": "perftest",
- "inputs": sources + dynlibs,
+ "inputs": sources,
"orderonly": [":perflib"],
"includes": includes
};
@@ -32,6 +32,7 @@ Environment:
#include <stdio.h>
#include <errno.h>
+#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -193,8 +193,13 @@ Return Value:
//
while (PtIsTimedTestRunning() != 0) {
- Handle = dlopen(LibraryName, 0);
+ Handle = dlopen(LibraryName, RTLD_NOW | RTLD_GLOBAL);
if (Handle == NULL) {
+ fprintf(stderr,
+ "Failed to open %s: %s\n",
+ LibraryName,
+ dlerror());
+
Result->Status = ENOENT;
break;
}
@@ -34,9 +34,10 @@ Environment:
#include <stdlib.h>
+#include <string.h>
#include <sys/wait.h>
+#include <time.h>
-#include <string.h>
#include "perftest.h"
@@ -30,9 +30,10 @@ Environment:
// ------------------------------------------------------------------- Includes
+#include <errno.h>
-#include <errno.h>
@@ -31,6 +31,7 @@ Environment: