diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
index 1c10fc03..ddca1584 100644
--- a/cinelerra-5.1/cinelerra/Makefile
+++ b/cinelerra-5.1/cinelerra/Makefile
@@ -435,8 +435,10 @@ LIBS := $(LIBRARIES)
 ifeq ($(WANT_CIN_3RDPARTY),no)
 LIBS += -lavcodec -lavdevice -lavfilter -lavformat -lavutil
 LIBS += -lswresample -lswscale
-LIBS += -lintl -liconv
-LIBS += -lexecinfo
+LIBS += -l:libtheoraenc.a -l:libtheoradec.a
+LIBS += -lmp3lame -ltwolame
+#LIBS += -lintl -liconv
+#LIBS += -lexecinfo
 
 LIBS += $(shared_libs)
 LIBS += $(system_libs)
diff --git a/cinelerra-5.1/cinelerra/ci b/cinelerra-5.1/cinelerra/ci
index bc987833..22858982 120000
--- a/cinelerra-5.1/cinelerra/ci
+++ b/cinelerra-5.1/cinelerra/ci
@@ -1 +1 @@
-../bin/cinelerra
\ No newline at end of file
+../bin/cin
\ No newline at end of file
diff --git a/cinelerra-5.1/cinelerra/fileogg.h b/cinelerra-5.1/cinelerra/fileogg.h
index 87c26dc1..76048bd6 100644
--- a/cinelerra-5.1/cinelerra/fileogg.h
+++ b/cinelerra-5.1/cinelerra/fileogg.h
@@ -29,7 +29,9 @@
 #include "mutex.inc"
 
 #include <theora/theora.h>
+extern "C" {
 #include <theora/theoraenc.h>
+}
 #include <theora/theoradec.h>
 #include <vorbis/codec.h>
 #include <vorbis/vorbisenc.h>
diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C
index a502c156..49e87d3a 100644
--- a/cinelerra-5.1/cinelerra/mwindow.C
+++ b/cinelerra-5.1/cinelerra/mwindow.C
@@ -1220,6 +1220,8 @@ void MWindow::init_theme()
 			theme_plugin = plugindb->get(i);
 	}
 
+printf("after pluginserver  for loop \n");
+
 	if( !theme_plugin )
 		fprintf(stderr, _("MWindow::init_theme: prefered theme %s not found.\n"),
 			 preferences->theme);
@@ -1246,18 +1248,29 @@ void MWindow::init_theme()
 			theme_plugin->title);
 		exit(1);
 	}
+	
 
 	theme = plugin->new_theme();
 	theme->mwindow = this;
+
+	
+	if(!theme)
+	exit(1);
+
+printf("befor strcpy in init_theme\n");
 	strcpy(theme->path, plugin->path);
+printf("after strcpy in init_theme\n");	
 	delete plugin;
-
+printf("before theme::initialize()\n");
 // Load default images & settings
 	theme->Theme::initialize();
+printf("After Theme:initialize\n");
 // Load user images & settings
 	theme->initialize();
+printf("After theme->initialize\n");
 // Create menus with user colors
 	theme->build_menus();
+printf("after theme->build_menus\n");
 	init_menus();
 
 	theme->sort_image_sets();
diff --git a/cinelerra-5.1/cinelerra/theme.C b/cinelerra-5.1/cinelerra/theme.C
index 8a667b5c..3cd6b491 100644
--- a/cinelerra-5.1/cinelerra/theme.C
+++ b/cinelerra-5.1/cinelerra/theme.C
@@ -215,6 +215,7 @@ void Theme::initialize()
 
 // Set images which weren't set by subclass
 	new_image("mode_normal", "mode_normal.png");
+	printf("in theme.C \n");
 	new_image("mode_add", "mode_add.png");
 	new_image("mode_subtract", "mode_subtract.png");
 	new_image("mode_multiply", "mode_multiply.png");
diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile
index 57cfb21f..c9d969c5 100644
--- a/cinelerra-5.1/guicast/Makefile
+++ b/cinelerra-5.1/guicast/Makefile
@@ -20,6 +20,17 @@ ifeq ($(OBJDIR), aarch64)
 BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B aarch64 -I binary -O elf64-littleaarch64\""
 endif
 
+ifeq ($(OBJDIR), ppc64)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf64-powerpc\""
+endif
+
+ifeq ($(OBJDIR), ppc)
+BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf32-powerpc\""
+endif
+
+
+
+
 $(shell mkdir -p $(OBJDIR) )
 
 OBJS = \
diff --git a/cinelerra-5.1/libzmpeg3/Makefile b/cinelerra-5.1/libzmpeg3/Makefile
index 47a0596f..cddcf611 100644
--- a/cinelerra-5.1/libzmpeg3/Makefile
+++ b/cinelerra-5.1/libzmpeg3/Makefile
@@ -79,7 +79,7 @@ UTILS += $(OBJDIR)/zmpeg3ifochk
 UTILS += $(OBJDIR)/zmpeg3cc2txt
 
 LIBS = -lm -lpthread
-
+LIBS += -la52
 LIBS += $(lib_a52dec) $(lib_djbfft) $(lib_libbthread)
 
 ifeq ($(DYNAMIC_FONTS), 1)
