Building error in Cluster 2.03.09
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Pavel Kuzin
node2:~/newcluster/cluster-2.03.09# uname -a Linux node2 2.6.27.4 #2 SMP Fri Oct 31 13:42:09 MSK 2008 i686 GNU/LinuxDistro - Debian Etch
Maybe...
Quoted 3 lines
Seems mkostemp is available since glibc 2.7. I have 2.6.
Can "mkostemp" be changed to another similar function?
#define mkostemp(val, flags) mkstemp(val)
?
Man page:
int mkstemp(char *template);
int mkostemp (char *template, int flags);
...
mkostemp() is like mkstemp(), with the difference that flags as for open(2) may be specified in flags (e.g., O_APPEND, O_SYNC).
Not sure the implications of doing this; I didn't analyze the open flags used.
-- Lon
Quoted 16 lines · Pavel Kuzin
Hello!
I`m trying to build cluster 2.03.09 against linux 2.6.27.4.
When building have a error:
upgrade.o: In function `upgrade_device_archive':
/root/newcluster/cluster-2.03.09/ccs/ccs_tool/upgrade.c:226: undefined reference to `mkostemp'
collect2: ld returned 1 exit status
make[2]: *** [ccs_tool] Error 1
make[2]: Leaving directory `/root/newcluster/cluster-2.03.09/ccs/ccs_tool' make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/newcluster/cluster-2.03.09/ccs'
make: *** [ccs] Error 2
Quoted 7 lines
node2:~/newcluster/cluster-2.03.09# uname -a Linux node2 2.6.27.4 #2 SMP Fri Oct 31 13:42:09 MSK 2008 i686 GNU/LinuxDistro - Debian Etch
Seems mkostemp is available since glibc 2.7. I have 2.6.
Can "mkostemp" be changed to another similar function?
Probably, I'll have a look on monday.
Fabio
--
I'm going to make him an offer he can't refuse.
Quoted 16 lines · Pavel Kuzin
Hello!
I`m trying to build cluster 2.03.09 against linux 2.6.27.4.
When building have a error:
upgrade.o: In function `upgrade_device_archive':
/root/newcluster/cluster-2.03.09/ccs/ccs_tool/upgrade.c:226: undefined reference to `mkostemp'
collect2: ld returned 1 exit status
make[2]: *** [ccs_tool] Error 1
make[2]: Leaving directory `/root/newcluster/cluster-2.03.09/ccs/ccs_tool' make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/newcluster/cluster-2.03.09/ccs'
make: *** [ccs] Error 2
Quoted 7 lines
node2:~/newcluster/cluster-2.03.09# uname -a Linux node2 2.6.27.4 #2 SMP Fri Oct 31 13:42:09 MSK 2008 i686 GNU/LinuxDistro - Debian Etch
Seems mkostemp is available since glibc 2.7. I have 2.6.
Can "mkostemp" be changed to another similar function?
You can apply this patch or wait for the next relese:
commit 6e8c492f8e8233bc5e295ae12322c40936279178
Author: Fabio M. Di Nitto <[email protected]> Date: Mon Nov 3 05:52:39 2008 +0100
ccs: fix build with older glibc
mkostemp has been introduced only in glibc 2.7. Switch to mkstemp.
ccs/ccs_tool/upgrade.c +1 -1
@@ -223,7 +223,7 @@ static int upgrade_device_archive(char *location){memset (tmp_file,0 ,128 );sprintf (tmp_file,"/tmp/ccs_tool_tmp_XXXXXX" ); - tmp_fd =mkostemp (tmp_file,O_RDWR |O_CREAT |O_TRUNC ); + tmp_fd =mkstemp (tmp_file);if (tmp_fd <0 ){fprintf (stderr,"Unable to create temporary archive: %s\n" ,strerror (errno)); error = -errno;
--
I'm going to make him an offer he can't refuse.