[Vm-dev] Compiling Interpreter VM on FreeBSD

Frank Shearar frank.shearar at gmail.com
Thu Jan 3 13:00:32 UTC 2013


On 3 January 2013 00:35, David T. Lewis <lewis at mail.msen.com> wrote:
>
> On Wed, Jan 02, 2013 at 07:22:42PM +0000, Frank Shearar wrote:
>>
>> I'm setting up more CI jobs, this time to give FreeBSD some love. So I
>> have a script that gets the bleeding edge Interpreter source, cd
>> platform/unix; make. The results are here:
>> http://squeakci.org/job/InterpreterVM-FreeBSD/13/console
>>
>> The punchline is that compilation fails thusly:
>>
>> In file included from
>> /usr/home/frank/temp/jenkins/workspace/InterpreterVM-FreeBSD/target/Squeak-vm-unix-4.10.7-2646-unofficial-src/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c:9:
>> /usr/local/include/uuid/uuid.h:44: error: conflicting types for 'uuid_t'
>> /usr/include/sys/uuid.h:74: error: previous declaration of 'uuid_t' was here
>
> Frank,
>
> The error message above looks mighty suspicious to me. Where did that
> /usr/local/include/uuid/uuid.h come from? I have a hunch that you may
> have a locally installed libuuid package that is providing a header
> file that conflicts with a /usr/include/sys/uuid.h that came with your
> base FreeBSD distribution.

It turns out that the misc/e2fsprog-libuuid added
/usr/local/include/uuid/uuid.h. I've uninstalled the package. Doing
that, and adding -m32, config.log tells me

conftest.c:69:23: error: uuid/uuid.h: No such file or directory
conftest.c: In function 'main':
conftest.c:73: error: 'uuid_generate' undeclared (first use in this function)
conftest.c:73: error: (Each undeclared identifier is reported only once
conftest.c:73: error: for each function it appears in.)
configure:28240: $? = 1
configure: failed program was:
<snip>
configure:28333: result: no
configure:28337: result: ******** disabling UUIDPlugin

I'm not sure if that's good or bad?

> I'm pretty sure that libuuid is entitled to some sort of Guiness world record
> for greatest number of stupid preventable bugs for a single small system
> library. The proliferation of include/uuid/uuid.h versus include/sys/uuid.h
> mismatches is a big part of it, but read our very own Mantis tale of woe for
> further entertainment:
>
> http://bugs.squeak.org/view.php?id=7358

I remember seeing Levente's UUID fixes and them blowing my mind:
"let's try do this and, if it works, we'll do _this_ otherwise we'll
do _that_". I'd never seen that done before.

frank

> Dave
>
>
>
>
>> /usr/home/frank/temp/jenkins/workspace/InterpreterVM-FreeBSD/target/Squeak-vm-unix-4.10.7-2646-unofficial-src/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c:
>> In function 'MakeUUID':
>> /usr/home/frank/temp/jenkins/workspace/InterpreterVM-FreeBSD/target/Squeak-vm-unix-4.10.7-2646-unofficial-src/platforms/unix/plugins/UUIDPlugin/sqUnixUUID.c:29:
>> warning: passing argument 1 of 'uuidgen' from incompatible pointer
>>
>> The relevant source is here:
>>
>>
>> int MakeUUID(char *location)
>> {
>> #if defined(HAVE_UUID_CREATE) && !defined(HAVE_UUIDGEN) &&
>> !defined(HAVE_UUID_GENERATE)
>>   size_t  len= 16;      /* 128 bits */
>>   uuid_t *uuid;
>>   uuid_create(&uuid);
>>   uuid_make(uuid, UUID_MAKE_V1);
>>   uuid_export(uuid, UUID_FMT_BIN, (void **)&location, &len);
>>   uuid_destroy(uuid);
>> #else
>>   uuid_t uuid;
>> #  if defined(HAVE_UUIDGEN)
>>   uuidgen(&uuid, 1);   // <-- this is line 29, the offender
>> #  elif defined(HAVE_UUID_GENERATE)
>>   uuid_generate(uuid);
>> #  endif
>>   memcpy((void *)location, (void *)&uuid, sizeof(uuid));
>> #endif
>>   return 1;
>> }
>>
>> Any ideas? I'm happy to do legwork, but Bozhe moi! This I know from nothing!
>>
>> frank


More information about the Vm-dev mailing list