Ik heb de volgende source:
Dit controleert de lengte van 'long int'
De command line die gebruikt word om dit te proberen te compilen:
Hierbij word gewoon het bestand 'conftest' aangemaakt, maar zodra het geprobeerd word te draaien:
-bash: ./conftest: No such file or directory
Ok, misschien mist ie wat libraries:
root@venus:~/test# ldd ./conftest
/usr/bin/ldd: line 124: ./conftest: No such file or directory
Nu begint het een beetje vreemd te worden.
een readelf van de binary lukt wel goed en ziet er ook normaal uit.
Wat zou dit kunnen veroorzaken?
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
| #define PACKAGE_NAME "setiathome_enhanced"
#define PACKAGE_TARNAME "setiathome_enhanced"
#define PACKAGE_VERSION "5.15"
#define PACKAGE_STRING "setiathome_enhanced 5.15"
#define PACKAGE_BUGREPORT "ports@setiathome.ssl.berkeley.edu"
#define PACKAGE "setiathome_enhanced"
#define VERSION "5.15"
#define VERSION_MAJOR 5
#define VERSION_MINOR 15
#define SAH_APP_NAME "setiathome_enhanced"
#ifdef __cplusplus
extern "C" void exit (int) throw ();
#endif
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define HOSTTYPE "i686-pc-linux-gnu"
#define _FILE_OFFSET_BITS 64
#define HAVE_PTHREAD 1
#define USE_OPENSSL 1
#define HAVE_LIBCRYPTO 1
#define HAVE_LIBSSL 1
#define HAVE_LIBDL 1
#define HAVE_LIBDL 1
#define HAVE_LIBM 1
#define HAVE_LIBM 1
#define HAVE_LIBFFTW3F 1
#define HAVE_LIBFFTW3F 1
#define HAVE_LIBNSL 1
#define HAVE_LIBNSL 1
#define HAVE_LIBRT 1
#define HAVE_LIBRT 1
#define HAVE_LIBZ 1
#define HAVE_LIBZ 1
#define HAVE_LIBJPEG 1
#define HAVE_LIBJPEG 1
#define HAVE_LIBSTDC++ 1
#define HAVE_LIBSTDC__ 1
#define HAVE_LIBGCC_EH 1
#define HAVE_LIBGCC_EH 1
#define HAVE_LIBGCC 1
#define HAVE_LIBGCC 1
#define HAVE_LIBPTHREAD 1
#define HAVE_LIBC 1
#define USE_IPP 1
#define PROJECTDIR "~boincadm/projects/ap"
#define USE_MYSQL 1
#define STDC_HEADERS 1
#define HAVE_ALGORITHM 1
#define HAVE_BITSET 1
#define HAVE_CASSERT 1
#define HAVE_CCTYPE 1
#define HAVE_CERRNO 1
#define HAVE_CFLOAT 1
#define HAVE_CLIMITS 1
#define HAVE_CLOCALE 1
#define HAVE_CMATH 1
#define HAVE_COMPLEX 1
#define HAVE_CSETJMP 1
#define HAVE_CSIGNAL 1
#define HAVE_CSTDARG 1
#define HAVE_CSTDDEF 1
#define HAVE_CSTDIO 1
#define HAVE_CSTDLIB 1
#define HAVE_CSTRING 1
#define HAVE_CTIME 1
#define HAVE_DEQUE 1
#define HAVE_FSTREAM 1
#define HAVE_FUNCTIONAL 1
#define HAVE_IOMANIP 1
#define HAVE_IOS 1
#define HAVE_IOSFWD 1
#define HAVE_IOSTREAM 1
#define HAVE_ISTREAM 1
#define HAVE_ITERATOR 1
#define HAVE_LIMITS 1
#define HAVE_LIST 1
#define HAVE_LOCALE 1
#define HAVE_MAP 1
#define HAVE_MEMORY 1
#define HAVE_NUMERIC 1
#define HAVE_OSTREAM 1
#define HAVE_QUEUE 1
#define HAVE_SET 1
#define HAVE_SSTREAM 1
#define HAVE_STACK 1
#define HAVE_STDEXCEPT 1
#define HAVE_STREAMBUF 1
#define HAVE_STRING 1
#define HAVE_UTILITY 1
#define HAVE_VALARRAY 1
#define HAVE_VECTOR 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_FCNTL_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MEMORY_H 1
#define HAVE_ALLOCA_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_IOCTL_H 1
#define HAVE_SYS_STATVFS_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DIRENT_H 1
#define HAVE_MATH_H 1
#define HAVE_FLOAT_H 1
#define HAVE_COMPLEX_H 1
#define HAVE_LONG_DOUBLE 1
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
#define HAVE_ST_BLOCKS 1
/* end confdefs.h. */
#include <stdio.h>
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
#else
# if HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
long longval () { return (long) (sizeof (long int)); }
unsigned long ulongval () { return (long) (sizeof (long int)); }
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
FILE *f = fopen ("conftest.val", "w");
if (! f)
exit (1);
if (((long) (sizeof (long int))) < 0)
{
long i = longval ();
if (i != ((long) (sizeof (long int))))
exit (1);
fprintf (f, "%ld\n", i);
}
else
{
unsigned long i = ulongval ();
if (i != ((long) (sizeof (long int))))
exit (1);
fprintf (f, "%lu\n", i);
}
exit (ferror (f) |fclose (f) != 0);
;
return 0;
} |
Dit controleert de lengte van 'long int'
De command line die gebruikt word om dit te proberen te compilen:
code:
1
| /opt/intel/cc/9.0/bin/icc -o conftest -fast -I/usr/include -I/usr/include/openssl -I/opt/intel/ipp/5.0/ia32//include -I/opt/intel/ipp/5.0/ia32//tools/staticlib -L/usr/lib -L/opt/intel/ipp/5.0/ia32//lib ./source2.c -lssl -lcrypto /usr/lib/libcrypto.a /usr/lib/libssl.a -Wl,-Bdynamic -ldl -Wl,-Bdynamic -lm /usr/local/lib/libfftw3f.a /usr/lib/libnsl.a -Wl,-Bdynamic -lrt /usr/lib/libz.a /usr/lib/libjpeg.a /usr/lib/libstdc++.a -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic -lpthread -Wl,-Bdynamic -lc -lippcore -lippsmerged |
Hierbij word gewoon het bestand 'conftest' aangemaakt, maar zodra het geprobeerd word te draaien:
-bash: ./conftest: No such file or directory
Ok, misschien mist ie wat libraries:
root@venus:~/test# ldd ./conftest
/usr/bin/ldd: line 124: ./conftest: No such file or directory
Nu begint het een beetje vreemd te worden.
een readelf van de binary lukt wel goed en ziet er ook normaal uit.
Wat zou dit kunnen veroorzaken?
Solar @ Dongen: http://solar.searchy.net/ - Penpal International: http://ppi.searchy.net/