You don't mention what/how you are trying to do this conversion. If you mention that you're using Calibre then the moderators might move this to the right subforum for you. If you're using some other method then you need to say. For example I produce an epub from OpenOffice using the Writer2xhtml
filter, and then I use Amazon software to convert the epub to mobi.